#include <bits/stdc++.h>
using namespace std;
const int N = 2500;
pair<int, int> v[N * N], a[N];
int n, m, res;
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d%d", &a[i].first, &a[i].second);
  m = 0;
  for (int i = (1); i <= (n); i++)
    for (int j = (1); j <= (n); j++)
      if (j != i) {
        v[++m].first = a[i].first - a[j].first;
        v[m].second = a[i].second - a[j].second;
      }
  sort(v + 1, v + 1 + m);
  res = 0;
  int d = 1, t = 1;
  for (int i = (2); i <= (m); i++)
    if (v[i].first == v[t].first && v[i].second == v[t].second)
      d++;
    else {
      res += d * (d - 1) / 2;
      t = i;
      d = 1;
    }
  res /= 4;
  printf("%d", res);
}
