#include <bits/stdc++.h>
using namespace std;
const int MAX = 3e3 + 5;
int main() {
  int n;
  scanf("%d", &n);
  pair<int, int> p[MAX];
  for (int i = 0; i < n; i++) scanf("%d %d", &p[i].first, &p[i].second);
  sort(p, p + n);
  int ans = 0;
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < n; j++)
      if ((p[i].first + p[j].first) % 2 == 0 &&
          (p[i].second + p[j].second) % 2 == 0)
        ans += binary_search(p, p + n,
                             make_pair((p[i].first + p[j].first) / 2,
                                       (p[i].second + p[j].second) / 2));
  printf("%d\n", ans);
}
