#include <bits/stdc++.h>
using namespace std;
set<pair<double, double>> allpoints;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    allpoints.insert(make_pair(a, b));
  }
  long ans = 0;
  for (auto a = allpoints.begin(); a != allpoints.end(); a++) {
    auto b = a++;
    swap(a, b);
    for (; b != allpoints.end(); b++) {
      auto midpoint =
          make_pair((a->first + b->first) / 2., (a->second + b->second) / 2.);
      if (allpoints.find(midpoint) != allpoints.end()) ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
