#include <bits/stdc++.h>
using namespace std;
int first[2020], second[2020];
pair<int, int> p[2020 * 2020];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", first + i, second + i);
  }
  int N = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      p[N++] = {first[i] + first[j], second[i] + second[j]};
    }
  }
  sort(p, p + N);
  long long ans = 0;
  for (int i = 0, j = 0; i < N; i = j) {
    for (; j < N && p[i] == p[j]; j++)
      ;
    ans += (long long)(j - i) * (j - i - 1) >> 1;
  }
  cout << ans;
}
