#include <bits/stdc++.h>
	#define ld long double
	#define rog 1000000000
	
	using namespace std;
	
	int main() {
		ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
		int n;
		long rez = 0;
		cin >> n;
		pair<ld, ld> h[n];
		for(int i = 0; i < n; i++) {
			cin >> h[i].first >> h[i].second;
		}
		map< pair<ld, ld>, int > we;
		
		for(int i = 0; i < n; i++) {
			for(int j = i + 1; j < n; j++) {
				ld u = sqrt((h[i].first - h[j].first) * (h[i].first - h[j].first) + (h[i].second - h[j].second) * (h[i].second - h[j].second));
				ld o;
				if(h[i].first == h[j].first) {
					o = rog;
				}
				else o = (h[i].second - h[j].second) / (h[i].first - h[j].first);
				we[make_pair(u, o)]++;
				if(we[make_pair(u / 2, o)] > 0) rez += we[make_pair(u / 2, o)];
				if(we[make_pair(u * 2, o)] > 0) rez += we[make_pair(u * 2, o)];
			}
		}
		cout << rez;
		return 0;
	}