#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
map<pair<int, int>, int> m;
pair<int, int> p[2005];
int main() {
  int n, x, y, i, j, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &x, &y);
    p[i] = make_pair(x, y);
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      if (i != j) {
        m[make_pair(p[i].first + p[j].first, p[i].second + p[j].second)]++;
      }
    }
  }
  long long int ans = 0;
  map<pair<int, int>, int>::iterator it;
  for (it = m.begin(); it != m.end(); it++) {
    k = (it->second) * ((it->second) - 1);
    k /= 2;
    ans += (long long int)(k);
  }
  cout << ans;
  return 0;
}
