#include<bits/stdc++.h>
using namespace std;

struct linija{
	long long x1,y1,x2,y2;

};
struct trap{
	double ssl,dist;
};


double sl(linija l1){
	return (double)(l1.y2 - l1.y1)/(double)(l1.x2 - l1.x1);
}

double pit(linija l1){
	return sqrt(pow((l1.x2 - l1.x1),2) + pow((l1.y2 - l1.y1),2));
}
bool cm(trap &t1,trap &t2){
return t1.ssl < t2.ssl;
}

int main(){// svaki trapez 4 temena	
	long long N,x,y,res=0;
	linija line1;
	trap ttrapez1;
	vector<pair <long,long>> kordinate;
	cin >> N;
	for (long long i = 0; i < N; i++){
		cin >> x >> y;
		kordinate.push_back(make_pair(x,y));
	}//unos
	
	// n * n-1 gen svih linija
	vector<trap> trapez;
	vector<linija> linije;
	for (long long i = 0; i < N;i++){
		
		for(long long y = i+1; y < N; y++){	
			line1.x1 = kordinate[i].first;
			line1.y1 = kordinate[i].second;
			line1.x2 = kordinate[y].first;	
			line1.y2 = kordinate[y].second;
			linije.push_back(line1);
			ttrapez1.ssl = sl(line1);
			ttrapez1.ssl == -INFINITY?ttrapez1.ssl = INFINITY : ttrapez1.ssl = ttrapez1.ssl;
			ttrapez1.dist = pit(line1);
			trapez.push_back(ttrapez1);
		//	printf("%lld %lld %lld %lld ",line1.x1,line1.y1,line1.x2,line1.y2);
		//	cout << ttrapez1.ssl <<" " << ttrapez1.dist << "\n";
		}
	}
	sort(trapez.begin(),trapez.end(),cm);
/*	for( auto i:trapez){
		cout << i.ssl << " " << i.dist << "\n";
	
	}*/
	
	long long arz=0;
	y = 0;
	for (long long i=0; i < trapez.size();i++){
		while (y < trapez.size() && trapez[y].ssl == trapez[i].ssl) {
			if(trapez[y].dist == trapez[i].dist / 2 || trapez[i].dist == trapez[y].dist / 2){
			res++;
			
	//		cout << trapez[y].ssl << " " << trapez[i].ssl << "\n";
	//		cout << trapez[y].dist << " " << trapez[i].dist << "\n";
		}
		y++;
		}

		i>y?y=i:y=y;
		
		}//trapez[y] ispunjen
	
	

	cout << res << "\n";
	return 0;
}