#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e6 + 10, MAXM = 4e6 + 10;
const int INF = INT_MAX, SINF = 0x3f3f3f3f;
const long long llINF = LLONG_MAX;
const int MOD = 1e9 + 7, mod = 998244353;
const int inv2 = 5e8 + 4;
int n;
map<pair<double, long long>, int> mp;
map<long long, int> Y;
int x[MAXN], y[MAXN], ans;
long long getd(long long x1, long long x2, long long y1, long long y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      if (x[i] == x[j]) {
        ans += Y[abs(y[i] - y[j])];
        Y[abs(y[j] - y[i])]++;
      } else {
        pair<double, long long> tmp = {(double)(y[i] - y[j]) / (x[i] - x[j]),
                                       getd(x[i], x[j], y[i], y[j])};
        ans += mp[tmp];
        mp[tmp]++;
      }
    }
  cout << ans / 2;
  return 0;
}
