#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3100;
pair<int, int> pnt[MAXN];
int main() {
  int N;
  scanf("%d", &N);
  set<pair<int, int> > pset;
  for (int i = 0; i < N; i++) {
    scanf("%d%d", &pnt[i].first, &pnt[i].second);
    pset.insert(pnt[i]);
  }
  int ans = 0;
  for (int i = 0; i < N; i++)
    for (int j = i + 1; j < N; j++) {
      int xs = pnt[i].first + pnt[j].first, ys = pnt[i].second + pnt[j].second;
      if ((xs & 1) == 0 && (ys & 1) == 0) {
        if (pset.count(make_pair(xs >> 1, ys >> 1))) ++ans;
      }
    }
  printf("%d\n", ans);
  return 0;
}
