#include <bits/stdc++.h>
using namespace std;
int const N = 3000 + 20, MAX = 2000 + 20;
int n, x[N], y[N], cnt[MAX][MAX];
long long ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++)
    cin >> x[i] >> y[i], cnt[x[i] + 1000][y[i] + 1000]++;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      if (((x[i] + x[j]) & 1) || ((y[i] + y[j]) & 1)) continue;
      ans += cnt[(x[i] + x[j]) / 2 + 1000][(y[i] + y[j]) / 2 + 1000];
    }
  return cout << ans, 0;
}
