#include <bits/stdc++.h>
using namespace std;
vector<long long> x, y;
set<long long> p;
int main() {
  int i, j, n, m, a, b, ans = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    p.insert(a * 5000 + b);
    x.push_back(a);
    y.push_back(b);
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < i; j++) {
      if (((x[i] + x[j]) % 2 == 0) && ((y[i] + y[j]) % 2 == 0)) {
        a = (x[i] + x[j]) / 2;
        b = (y[i] + y[j]) / 2;
        if (p.find(a * 5000 + b) != p.end()) {
          ans++;
        }
      }
    }
  }
  cout << ans << endl;
  cin.get();
  cin.get();
}
