#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
bool f[N][N];
int x[3005], y[3005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    f[x[i] + 1000][y[i] + 1000] = true;
  }
  int ans = 0;
  for (int i = 1; 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;
      int x_md = (x[i] + x[j]) / 2;
      int y_md = (y[i] + y[j]) / 2;
      if (f[x_md + 1000][y_md + 1000] == 1) ans++;
    }
  }
  cout << ans << endl;
}
