#include <bits/stdc++.h>
using namespace std;
long long int inline ipow(long long int a, long long int b, long long int m) {
  long long int val = 1;
  a %= m;
  while (b) {
    if (b & 01) val = (val * a) % m;
    b >>= 1;
    a = (a * a) % m;
  };
  return val % m;
}
long long int inline ipow(long long int a, long long int b) {
  long long int val = 1;
  while (b) {
    if (b & 01) val = (val * a);
    b >>= 1;
    a = (a * a);
  };
  return val;
}
pair<int, int> a[2003];
map<pair<int, int>, int> m;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  clock_t tStart = clock();
  int n, infc = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      m[make_pair(a[i].first + a[j].first, a[i].second + a[j].second)]++;
    }
  map<pair<int, int>, int>::iterator itr;
  int ans = 0;
  for (itr = m.begin(); itr != m.end(); itr++) {
    int val = itr->second;
    ans += (val * (val - 1)) / 2;
  }
  cout << ans << endl;
  return 0;
}
