#include <bits/stdc++.h>
using namespace std;
int a[1000000 + 5], b[1000000 + 5];
int c[5000 + 5][5000 + 5];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    c[a[i] + 1000][b[i] + 1000]++;
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (c[(a[i] + a[j]) / 2 + 1000][(b[i] + b[j]) / 2 + 1000] > 0 &&
          (a[i] + a[j]) % 2 == 0 && (b[i] + b[j]) % 2 == 0)
        ans++;
    }
  }
  cout << ans;
}
