#include <bits/stdc++.h>
using namespace std;
bool a[2010][2010];
int b[3001][2];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    a[x + 1000][y + 1000] = 1;
    b[i][0] = x;
    b[i][1] = y;
  }
  int tot = 0;
  for (int i = 1; i <= n - 1; i++) {
    for (int j = i + 1; j <= n; j++) {
      if ((b[i][0] + b[j][0]) % 2 == 0 && (b[i][1] + b[j][1]) % 2 == 0)
        if (a[(b[j][0] + b[i][0]) / 2 + 1000][(b[j][1] + b[i][1]) / 2 + 1000] ==
            1) {
          tot++;
        }
    }
  }
  cout << tot;
  return 0;
}
