#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  while (scanf("%d", &n) != EOF) {
    vector<vector<int>> p(n, vector<int>(2));
    set<pair<int, int>> s;
    for (int i = 0; i < n; i++) {
      scanf("%d%d", &p[i][0], &p[i][1]);
      s.insert({p[i][0], p[i][1]});
    }
    int c = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        int sx = p[i][0] + p[j][0];
        int sy = p[i][1] + p[j][1];
        if (sx % 2 == 0 && sy % 2 == 0 && s.find({sx / 2, sy / 2}) != s.end()) {
          c++;
        }
      }
    }
    printf("%d\n", c);
  }
  return 0;
}
