#include <iostream>
#include <cmath>
using namespace std;

int main(){
    int n; 
    cin>>n;
    long int x[n];
    long int y[n];
    long int distance[n];
    int kontrolor= 0;
    for(int i = 0; i<n; i++){
        cin>>x[i];
        cin>>y[i];
    }
    for(int i = 0; i<n; i=i+2){
        distance[i] = sqrt(pow(x[i]-x[i+1],2) + pow(y[i]-y[i+1], 2));
    }
    for(int i=0; i<n-1; i++){
        for(int j=i+1; j<n; j++){
            if((distance[i] / distance[j] == 2) || (distance[j] / distance[i] == 2)){
                kontrolor++;
            }
        }
    }
    cout<<kontrolor;
}