#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > s;
bool is_mid(pair<int, int> a, pair<int, int> b) {
  double x = (double)(a.first + b.first) / 2,
         y = (double)(a.second + b.second) / 2;
  if ((int)x - x == 0 && (int)y - y == 0 &&
      s.find(pair<int, int>((int)x, (int)y)) != s.end()) {
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    s.insert(pair<int, int>(x, y));
  }
  long long sum = 0;
  for (set<pair<int, int> >::iterator it = s.begin(); it != s.end(); it++) {
    pair<int, int> a = (*it);
    set<pair<int, int> >::iterator ite = it;
    ite++;
    for (; ite != s.end(); ite++) {
      pair<int, int> b = (*ite);
      if (a != b && is_mid(a, b)) sum++;
    }
  }
  cout << sum << endl;
  return 0;
}
