#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, a, x, y, cont, x2, y2, x3, y3, i;
  cin >> n;
  cont = 0;
  vector<pair<int, int> > vetor(n);
  vector<pair<int, int> >::iterator it;
  for (a = 0; a < n; a++) {
    cin >> x >> y;
    vetor[a] = make_pair(x, y);
  }
  sort(vetor.begin(), vetor.end());
  for (a = 0; a < n; a++) {
    for (i = a + 1; i < n; i++) {
      x = vetor[a].first;
      y = vetor[a].second;
      x3 = vetor[i].first;
      y3 = vetor[i].second;
      x2 = (x3 * 2) - x;
      y2 = (y3 * 2) - y;
      it = lower_bound(vetor.begin(), vetor.end(), make_pair(x2, y2));
      if (*it == make_pair(x2, y2)) {
        cont++;
      }
    }
  }
  cout << cont << '\n';
  return 0;
}
