#include <bits/stdc++.h>
using namespace std;
bool we[1001][1001];
bool k[1001][1001];
bool w[1001][1001];
bool e[1001][1001];
int main() {
  int n;
  cin >> n;
  vector<pair<int, int>> v;
  set<pair<int, int>> second;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    v.push_back({x, y});
    second.insert({x, y});
  }
  int cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int a = (floor)((v[i].first + v[j].first) / 2.0);
      int b = (floor)((v[i].second + v[j].second) / 2.0);
      int c = (ceil)((v[i].first + v[j].first) / 2.0);
      int d = (ceil)((v[i].second + v[j].second) / 2.0);
      if (c == a && b == d) {
        if (second.find({a, b}) != second.end()) cnt++;
      }
    }
  }
  cout << cnt << endl;
}
