#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t-- > 0) {
    int n, x, y, x1, x2, y1, y2, c = 0;
    cin >> n;
    vector<pair<int, int>> v;
    map<pair<int, int>, int> m;
    for (int i = 0; i < n; i++) {
      cin >> x >> y;
      v.push_back(make_pair(x, y));
      m.insert({{x, y}, 1});
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < n; i++) {
      for (int j = i + 2; j < n; j++) {
        x1 = v[i].first;
        x2 = v[j].first;
        y1 = v[i].second;
        y2 = v[j].second;
        if ((x1 + x2) % 2 == 1 || (y1 + y2) % 2 == 1 || (x1 + x2) % 2 == -1 ||
            (y1 + y2) % 2 == -1)
          continue;
        else {
          x = (x1 + x2) / 2;
          y = (y1 + y2) / 2;
          if (m.find({x, y}) != m.end()) c++;
        }
      }
    }
    cout << c << endl;
  }
  return 0;
}
