#include <bits/stdc++.h>
using namespace std;
long long n, a, b, k, w[100003], c;
long long mod = 1e9 + 9;
long long poww(long long x, long long y) {
  if (y == 0) return 1;
  if (x == 1) return 1;
  if (x == 0) return 0;
  if (y == 1) return x;
  long long d = poww(x, y / 2);
  d %= mod;
  if (y % 2) return (((d * d) % mod) * x) % mod;
  return (d * d) % mod;
}
long long inf = 1e10;
double X[100003], Y[100003];
map<pair<double, double>, long long> M;
long long f(long long x) { return (x * (x - 1)) / 2; }
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &X[i], &Y[i]);
  }
  if (n < 4) return cout << 0, 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      M[{(X[i] + X[j]) / 2, (Y[i] + Y[j]) / 2}]++;
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      ans += f(M[{(X[i] + X[j]) / 2, (Y[i] + Y[j]) / 2}]);
      M[{(X[i] + X[j]) / 2, (Y[i] + Y[j]) / 2}] = 0;
    }
  }
  cout << ans;
  return 0;
}
