#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0;
  scanf("%d", &n);
  set<pair<int, int> > p;
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    p.insert(make_pair(x, y));
  }
  for (set<pair<int, int> >::iterator it1 = p.begin(); it1 != p.end(); ++it1) {
    for (set<pair<int, int> >::iterator it2 = (++it1)--; it2 != p.end();
         ++it2) {
      if (!((it1->first + it2->first) % 2) &&
          !((it1->second + it2->second) % 2)) {
        int x = (it1->first + it2->first) / 2;
        int y = (it1->second + it2->second) / 2;
        if (p.find(make_pair(x, y)) != p.end()) {
          ++count;
        }
      }
    }
  }
  printf("%d", count);
  return 0;
}
