#include <bits/stdc++.h>
using namespace std;
bool fre[2005][2005];
int n, x[3005], y[3005];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    fre[x[i] + 1000][y[i] + 1000] = true;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (((x[i] + x[j]) % 2) != 0 || ((y[i] + y[j]) % 2) != 0) {
        continue;
      } else {
        int kx = (x[i] + x[j]) / 2;
        int ky = (y[i] + y[j]) / 2;
        if (fre[kx + 1000][ky + 1000]) {
          ans++;
        }
      }
    }
  }
  cout << ans;
  return 0;
}
