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

int main(int argc, char const *argv[])
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);
	int n;
	cin >> n;
	unordered_map<double, unordered_map<double, unsigned int>> mapi;
	vector <pair<int, int>> vec(n);
	for (int i = 0; i < n; i++) {
		cin >> vec[i].first >> vec[i].second;
	}

	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			//cout << "I: " << i << " J:" << j << endl;
			double x = vec[i].first - vec[j].first;
			double y = vec[i].second - vec[j].second;
			//cout << "abs(x) / abs(y): " << abs(x) / abs(y) << " x * x + y * y:" << x * x + y * y << endl;

			if (y != 0)
				mapi[x / y][abs(y)]++;
			else
				mapi[numeric_limits<int>::min()][abs(x)]++;
		}
	}

	int ans = 0;

	for (auto& a : mapi) {
		for (const auto& b : a.second) {
			//cout << a.first << " " << b.first << " " << b.second << endl;
			if (a.second.count(b.first * 2))
				ans += b.second * a.second[b.first * 2];
		}
	}
	cout << ans << endl;

	return 0;
}