#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[3000];
int main() {
  int i, j, k, n, an = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    int first, second;
    cin >> first >> second;
    a[i] = make_pair(first * 2, second * 2);
  }
  sort(a, a + n);
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++)
      if (make_pair((a[i].first + a[j].first) / 2,
                    (a[i].second + a[j].second) / 2) ==
          *lower_bound(a, a + n,
                       make_pair((a[i].first + a[j].first) / 2,
                                 (a[i].second + a[j].second) / 2)))
        an++;
  cout << an << endl;
  return 0;
}
