#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <math.h>
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
	int n;cin>>n;
	vector<pair<float,float>> kor;
	for(int i=0;i<n;i++){
		float x,y;cin>>x>>y;
		pair<float,float> g=make_pair(x,y);
		kor.push_back(g);
	}
	vector<pair<float,float>> slopovi;
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			float slope=(kor[j].second-kor[i].second)/(kor[j].first-kor[i].first);
			float dist=sqrt(pow(kor[j].first-kor[i].first,2)+pow(kor[j].second-kor[i].second,2));
			if(isnormal(slope)==0){
				slope=abs(slope);
			}
			pair<float,float> f=make_pair(slope,dist);
			slopovi.push_back(f);
		}
	}	
	sort(slopovi.begin(),slopovi.end());
	/*for(int i=0;i<slopovi.size();i++){
		cout<<slopovi[i].first<<" "<<slopovi[i].second<<endl;;
	}*/
	int trap=0;
	for(int i=0;i<slopovi.size();i++){
		if(slopovi[i+1].first==slopovi[i].first){
			//cout<<"a"<<endl;
			for(int j=i+1;slopovi[j].first==slopovi[i].first;j++){
				//cout<<"a"<<endl;
				if(slopovi[j].second>slopovi[i].second){
					if(slopovi[j].second/slopovi[i].second==2){
						trap++;
					}
				}
				else if(slopovi[j].second<slopovi[i].second){
					if(slopovi[i].second/slopovi[j].second==2){
						trap++;
					}
				}
			}
		}
	}
	cout<<trap;
	return 0;
}