#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
template <class T>
inline T bigMod(T p, T e, T M) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T modInverse(T a, T M) {
  return bigMod(a, M - 2, M);
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / gcd(a, b)) * b;
}
template <class T>
inline string int2String(T a) {
  ostringstream str;
  str << a;
  return str.str();
}
const int dr[] = {0, 1, 0, -1, -1, 1, 1, -1, -2, -2, 2, 2, -1, -1, 1, 1};
const int dc[] = {1, 0, -1, 0, 1, 1, -1, -1, -1, 1, -1, 1, -2, 2, -2, 2};
map<long long, long long> mp;
const long long maxn = 2e3 + 3, sh = 2e9;
int n;
pair<int, int> point[maxn];
long long mid_point[maxn * maxn];
int main() {
  scanf("%d", &n);
  for (int i = int(0); i < int(n); i++)
    scanf("%d%d", &point[i].first, &point[i].second);
  int N = 0;
  for (int i = int(0); i < int(n); i++) {
    for (int j = int(i + 1); j < int(n); j++) {
      mid_point[N++] = (point[i].first + point[j].first) * sh +
                       point[i].second + point[j].second;
    }
  }
  sort(mid_point, mid_point + N);
  long long res = 0, cnt;
  for (int i = int(0); i < int(N); i++) {
    int j = i;
    while (j < N && mid_point[i] == mid_point[j]) j++;
    cnt = j - i;
    res += cnt * (cnt - 1) / 2;
    i = j - 1;
  }
  printf("%lld\n", res);
  return 0;
}
