#include <bits/stdc++.h>
using namespace std;
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long pow(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
void solve() {
  long long num;
  cin >> num;
  vector<pair<long long, long long>> v;
  set<pair<long long, long long>> s;
  for (long long i = 0; i < num; i++) {
    long long x, y;
    cin >> x >> y;
    v.emplace_back(x, y);
    s.insert(make_pair(x, y));
  }
  long long c = 0;
  for (long long i = 0; i < num; i++) {
    for (long long j = i + 1; j < num; j++) {
      long long x = v[i].first;
      long long y = v[i].second;
      long long x1 = v[j].first;
      long long y1 = v[j].second;
      if (ceil((double)(x + x1) / (double)2) ==
              floor((double)(x + x1) / (double)2) &&
          ceil((double)(y + y1) / (double)2) ==
              floor((double)(y + y1) / (double)2)) {
        pair<long long, long long> temp;
        temp.first = (x + x1) / 2;
        temp.second = (y + y1) / 2;
        if (s.find(temp) != s.end()) c++;
      }
    }
  }
  cout << c;
}
int32_t main() {
  c_p_c();
  solve();
  return 0;
}
