#include<iostream>
#include<algorithm>

using namespace std;

struct AM{
	
int duzina;
int i1;
int j1;	
	
};
AM U[2000000];

long long Prvivecilijednak(long long a,long long n){

long long l=0,d=n-1;
long long s=(l+d)/2;

while(l<=d){

s=(l+d)/2;
if(a>U[s].duzina)
l=s+1;
else
d=s-1;

}
return l;	
	
}
long long Prviveci(long long a,long long n){

long long l=0,d=n-1;
long long s=(l+d)/2;

while(l<=d){

s=(l+d)/2;
if(a>=U[s].duzina)
l=s+1;
else
d=s-1;

}
return l;	
	
}	
	


bool sort1(AM a,AM b){

return a.duzina<b.duzina;	
	
}

int main(){
	
	long long n,i,j,jj,l;
	long long x[2000], y[2000];
	
	cin >> n;
	
	for(i=0;i<n;i++){
	
	cin >> x[i] >> y[i];
		
	}
	long long k=0;
	for(i=0;i<n;i++){
	
	for(j=i+1;j<n;j++){
	
	U[k].duzina=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]);
	U[k].i1=i;	
	U[k].j1=j;	
		
	k++;	
	}
		
	}
	sort(U,U+k,sort1);
	long long u=0;
	double kof1,kof2;
	long long x3,y3;
	long long x4,y4;
	long long x5,y5;
	long long x6,y6;
	//cout << k << "\n";
	
	
	for(i=0;i<k;i++){
		
	//cout << i;	
	//cout << U[i].duzina << " " << U[i].i1 << " " << U[i].j1 << '\n';
	j=Prvivecilijednak(4*U[i].duzina,k);
	jj=Prviveci(4*U[i].duzina,k);
	//cout << j << " " << jj << "\n";
	x3=x[U[i].i1];
	y3=y[U[i].i1];
	x4=x[U[i].j1];
	y4=y[U[i].j1];
	
	for(l=j;l<jj;l++){
	//cout << l;	
	x5=x[U[l].i1];
	y5=y[U[l].i1];
	x6=x[U[l].j1];
	y6=y[U[l].j1];
	
	if(x3==x4 && x5==x6){	
	//cout << x3 << " " << y3 << " " << x4 << " " << y4 << " " << x5 << " " << y5  << " " << x6 << " " << y6 << '\n';     
		u++;
	}
	else{
		
		if(x4!=x3 && x6!=x5){
		
	 	kof1=(y4-y3)/(x4-x3);
		kof2=(y6-y5)/(x6-x5);
	
		
	
		if(kof1==kof2){
     u++;	
 //cout << x3 << " " << y3 << " " << x4 << " " << y4 << " " << x5 << " " << y5  << " " << x6 << " " << y6 << '\n';  
	  }
		}
  }
	
	}
	

	}
	cout << u;
	
	return 0;
}