#include <bits/stdc++.h>
using namespace std;
int n;
int X[2003], Y[2003];
map<pair<pair<int, int>, long long>, long long> mp;
int gcd(int a, int b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &X[i], &Y[i]);
    for (int j = 0; j < i; j++) {
      int dy = Y[j] - Y[i];
      int dx = X[j] - X[i];
      long long jar = 1LL * dy * dy + 1LL * dx * dx;
      if (dy < 0) dy = -dy, dx = -dx;
      int fpb = gcd(dy, abs(dx));
      dy /= fpb, dx /= fpb;
      if (dy == 0)
        mp[{{0, 1}, jar}]++;
      else if (dx == 0)
        mp[{{1, 0}, jar}]++;
      else
        mp[{{dy, dx}, jar}]++;
    }
  }
  long long res = 0;
  for (auto it : mp) res += 1LL * (it.second - 1) * it.second / 2;
  printf("%lld\n", res / 2);
}
