#include <bits/stdc++.h>

using namespace std;

int main(){
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL) ; cout.tie(NULL) ;
    
    //cout<<"aasaa";
    int n;
    cin>>n;
    //cout<<"n";
    pair<int, int> k[n];
    pair<int, int> veliki_niz[n*n];
    int koef, udalj, x, y;
    
    //cout<<"pre unosa";
    for(int i = 0; i<n; i++){
    	cin>>k[i].first>>k[i].second;
	}
	//cout<<"   aaaa";
	long int vni=0;
	if(n<4){
		cout<<0;
	}else{
		//cout<<1;
		for(int i = 0; i< n; i++){
			for(int j = i+1; j<n; j++){
				x=k[j].first-k[i].first;
				y=k[j].second-k[i].second;
				koef = (x==0)? 2147483646 : y/x;
				udalj = sqrt(x*x+y*y);
				veliki_niz[vni].first=koef;
				veliki_niz[vni].second=udalj;
				vni++;
				//cout<<vni<<endl;
			}
		}
		sort(veliki_niz, veliki_niz+vni);
	
		long int resenje=0;
		long int i=0, j=1;
		while(j<vni){
			if(veliki_niz[i].first==veliki_niz[j].first){
				if(veliki_niz[i].second==2*veliki_niz[j].second || veliki_niz[j].second==2*veliki_niz[i].second){
				    	resenje++;
				}
			}else{
				i=j;			
			}
			j++;
			//cout<<j<<" "<<vni<<endl;
		}
		cout<<resenje;	
	}
	
    return 0;
}