#include <bits/stdc++.h>
using namespace std;
int x[3010], y[3010];
bool vis[2010][2010];
int main() {
  memset(vis, false, sizeof vis);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    x[i] += 1000;
    y[i] += 1000;
    vis[x[i]][y[i]] = 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) continue;
      if ((y[i] + y[j]) % 2) continue;
      int X = (x[i] + x[j]) / 2;
      int Y = (y[i] + y[j]) / 2;
      if (vis[X][Y]) ans++;
    }
  cout << ans << endl;
  return 0;
}
