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

void pairsort(float a[], float b[], int n)
{
    pair<int, char> pairt[n];
  

    for (int i = 0; i < n; i++) 
    {
        pairt[i].first = a[i];
        pairt[i].second = b[i];
    }
   
    sort(pairt, pairt + n);    
    
    for (int i = 0; i < n; i++) 
    {
        a[i] = pairt[i].first;
        b[i] = pairt[i].second;
    }
}


int main() 
{ 
	int n,p=0;
	cin>>n;
	int x[n],y[n];
	for(int i=0;i<n;i++)
	cin>>x[i]>>y[i];
	
	int velicina = n*(n-1)/2;
	float k[velicina],d[velicina];
	
	float a=0,b=0;
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){			
			a=float(y[j]-y[i]);
			b=float(x[j]-x[i]);
			k[p]=float(a/b);
			d[p]=float(sqrt((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j])));
			p++;
		}
	}

	pairsort(k, d, velicina);



//for(int i=0;i<velicina;i++) cout<<k[i]<<" "<<d[i]<<endl;
int s=0;
	for(int i=0;i<velicina;i++){
		int j=1;
		while(k[i]==k[i+j]){
			if(d[i]==2*d[i+j] || d[i]==d[i+j]/2)s++;
			j++;
		}
	}


cout<<s;

    return 0; 
}