#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int x[3100], y[3100];
int mid[3100][3100];
int main(void) {
  int n;
  cin >> n;
  memset(mid, 0, sizeof(mid));
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    x[i] += 1000;
    y[i] += 1000;
    mid[x[i]][y[i]] = 1;
  }
  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) {
        int q = (x[i] + x[j]) / 2;
        int w = (y[i] + y[j]) / 2;
        if (mid[q][w] == 1) ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
