#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3010;
int n;
pair<int, int> a[MAXN];
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  sort(a, a + n);
  int cnt = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      if (((a[i].first + a[j].first) % 2 == 0) &&
          ((a[i].second + a[j].second) % 2 == 0)) {
        pair<int, int> t = make_pair((a[i].first + a[j].first) / 2,
                                     (a[i].second + a[j].second) / 2);
        int p = lower_bound(a, a + n, t) - a;
        cnt += (int)((p < n) && (a[p] == t));
      }
    }
  cout << cnt << endl;
  return 0;
}
