#include <bits/stdc++.h>
using namespace std;
int dirx[] = {1, -1, 0, 0}, diry[] = {0, 0, 1, -1};
long long bigmod(long long x, long long p) {
  long long res = 1;
  while (p) {
    if (p & 1) res = (res * x) % 998244353;
    x = (x * x) % 998244353;
    p >>= 1;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  map<pair<int, int>, int> cnt;
  vector<pair<int, int> > inp(n);
  for (auto& p : inp) cin >> p.first >> p.second;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int x = inp[i].first + inp[j].first, y = inp[i].second + inp[j].second;
      cnt[{x, y}]++;
    }
  }
  long long ans = 0;
  for (auto x : cnt) ans += (x.second - 1) * x.second / 2;
  cout << ans;
  return 0;
}
