#include <bits/stdc++.h>
using namespace std;
int n, a[4000], b[4000];
int cnt[2005][2005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &a[i], &b[i]);
    a[i] += 1000;
    b[i] += 1000;
  }
  for (int i = 1; i < n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if ((a[i] + a[j]) % 2 == 0 && (b[i] + b[j]) % 2 == 0)
        cnt[(a[i] + a[j]) >> 1][(b[i] + b[j]) >> 1]++;
    }
  }
  int res = 0;
  for (int i = 1; i <= n; ++i) res += cnt[a[i]][b[i]];
  printf("%d", res);
  return 0;
}
