#include<bits/stdc++.h>
using namespace std;
int N,x[1509],y[1509],nzd,n;
long long dx,dy,sol;
struct slog{
	long long D,ky,kx;
	bool operator < (const slog &a) const {
      return ((D<a.D) or
							(D==a.D and ky <a.ky) or
							(D==a.D and ky==a.ky and kx<a.kx));
	}
}niz[2300009],l;
int NZD(int a,int b){
	a=abs(a);
	b=abs(b);
	while(a%b){
		swap(a,b);
		a%=b;
	}
	return b;
}
map<slog,int>Mapa;
int main(){
	cin>>N;
	for(int i=1; i<=N; i++)cin>>x[i]>>y[i];
	for(int i=1; i<=N; i++){
		for(int j=i+1; j<=N; j++){
			dx=x[i]-x[j];
			dy=y[i]-y[j];
			l.D=dx*dx+dy*dy;
			if(dx!=0 and dy!=0){
				nzd=NZD(dx,dy);
				l.kx=dx/nzd;
				l.ky=dy/nzd;
			}
			if(dx==0){
				l.kx=0;
				l.ky=1;
			}
			if(dy==0){
				l.kx=1;
				l.ky=0;
			}
			if(l.ky<0){
				l.ky=-l.ky;
				l.kx=-l.kx;
			}
			//cout<<i<<" "<<l.D<<" "<< l.ky<<" "<<l.kx<<endl;
			Mapa[l]++;
			if(Mapa[l]==1)niz[++n]=l;
		}
	}

	//cout<<"------------------------"<<endl;
	for(int i=1; i<=n; i++){
		l=niz[i];
		l.D*=4;
		//cout<<i<<" "<<l.D<<" "<< l.ky<<" "<<l.kx<<" ";
		//cout<<"=>"<<Mapa[l]<<endl;
		sol+=Mapa[l];
	}
	cout<<sol<<endl;
	return 0;
}