#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 10;
pair<int, int> arr[N];
map<pair<double, long long>, int> S;
double get(int i, int j) {
  if (arr[j].first == arr[i].first) return 0x3f3f3f3f;
  return ((double)arr[j].second - arr[i].second) /
         (arr[j].first - arr[i].first);
}
long long get_d(int i, int j) {
  return ((long long)arr[j].second - arr[i].second) *
             (arr[j].second - arr[i].second) +
         ((long long)arr[j].first - arr[i].first) *
             (arr[j].first - arr[i].first);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    arr[i] = {a, b};
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      double k = get(i, j);
      long long dist = get_d(i, j);
      S[{k, dist}]++;
    }
  int num = 0;
  for (auto t : S) {
    if (t.second == 2) continue;
    t.second /= 2;
    num += t.second * (t.second - 1) / 2;
  }
  printf("%d", num / 2);
  return 0;
}
