#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 0;
  cin >> n;
  int x[n], y[n];
  vector<bool> p[2001];
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    x[i] += 1000;
    y[i] += 1000;
  }
  for (int i = 0; i < 2001; i++)
    for (int j = 0; j < 2001; j++) p[j].push_back(0);
  for (int i = 0; i < n; i++) p[x[i]][y[i]] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      int ttx = x[i] + x[j], tty = y[i] + y[j];
      if (ttx % 2 != 0 || tty % 2 != 0) continue;
      int tx = ttx / 2, ty = tty / 2;
      if (p[tx][ty]) ans++;
    }
  }
  cout << ans / 2;
}
