#include <bits/stdc++.h>
using namespace std;
int ans;
int x[3005], y[3005];
int f[2005][2005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    x[i] += 1000;
    y[i] += 1000;
    f[x[i]][y[i]] = 1;
  }
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if ((x[i] + x[j]) % 2 == 0 && (y[i] + y[j]) % 2 == 0 &&
          f[(x[i] + x[j]) / 2][(y[i] + y[j]) / 2] == 1) {
        ans++;
      }
    }
  }
  cout << ans;
  return 0;
}
