#include <bits/stdc++.h>
using namespace std;

double rastojanje( int xa, int ya, int xb, int yb ){
double r = sqrt( ( xa - xb ) * ( xa - xb ) + (ya - yb) * ( ya - yb ) );
return r;
}

bool paralelne( int xa, int ya, int xb, int yb, int xc, int yc, int xd, int yd ){
if ( abs(xa - xb) * abs(yc - yd) == abs(ya - yb) * abs(xc - xd) ){
    return true;
}
else{
    return false;
}
}

int main(){
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
long long n; cin >> n;
int x[n], y[n];
double rastojanja[n][n];
int br = 0;
for ( int i = 0; i < n; i++ ){
    cin >> x[i] >> y[i];
    for ( int j = 0; j < i; j++ ){
        rastojanja[i][j] = rastojanje(x[i], y[i], x[j], y[j]);
            for ( int m = 0; m < i; m++ ){
                for ( int s = 0; s < j; s++ ){
                    if ( (2 * rastojanja[i][j] == rastojanja[m][s]) || ( 2* rastojanja[m][s] == rastojanja[i][j]) ){
                        if ( paralelne( x[i], y[i], x[j], y[j], x[m],y[m],x[s], y[s] ) == true ){
                            br++;
                        }
                    }
                }
            }
    }

}
cout << br;
return 0;
}