#include<iostream>
#include<string>
#include<math.h>
#include<algorithm>
#include<map>
#include<vector>

using namespace std;
	vector<double> niz[10000000];
int main()
{
//	cin.tie(0);
//cout.tie(0);
////ios::sync_with_stdio(0);
	map<double,int> g;
int a,b,c,n,i,k=1,j,l,bro=0;
double ugao,raz;
pair<double,double> kor[2000];
cin>>n;
for(i=0;i<n;i++)
{
	
	cin>>kor[i].first>>kor[i].second;
	
	for(j=0;j<i;j++)
	{
		if(((double)kor[i].second-(double)kor[j].second)!=0)
			ugao=(double)(((double)kor[i].first-(double)kor[j].first)/((double)kor[i].second-(double)kor[j].second));
			else ugao=1.79184;
		
	//	cout<<ugao<<" "<<((double)kor[i].first-(double)kor[j].first)<<" "<<((double)kor[i].second-(double)kor[j].second)<<endl;
		raz=sqrt(((double)kor[i].first-(double)kor[j].first)*((double)kor[i].first-(double)kor[j].first)+((double)kor[i].second-(double)kor[j].second)*((double)kor[i].second-(double)kor[j].second));
	raz=round(raz*1000)/1000;
//	cout<<ugao<<"ug"<<i<<" "<<j<<endl;
		if(g[ugao]!=NULL)niz[g[ugao]].push_back(raz);
		if(g[ugao]==NULL)
		{//cout<<ugao<<"uuu"<<endl;
			g[ugao]=k;
			k++;
			niz[g[ugao]].push_back(raz);
		}
	}
}
//cout<<k<<"k";
for(i=1;i<k;i++)
{//cout<<niz[i].size()<<"s";
	for(j=0;j<niz[i].size();j++)
{
	for(l=j;l<niz[i].size();l++)
	{//cout<<niz[i][j]<<" "<<niz[i][l]<<endl;
		if(niz[i][j]==2*niz[i][l] || niz[i][j]*2==niz[i][l])bro++;
	}
	
	}
}
cout<<bro;
}