#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  vector<pair<double, double>> v;
  for (long long int i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    pair<double, double> z = make_pair(x, y);
    v.push_back(z);
  }
  sort(v.begin(), v.end());
  long long int ans = 0;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = i + 2; j <= n - 1; j++) {
      double a = (v[i].first + v[j].first) / 2;
      double b = (v[i].second + v[j].second) / 2;
      pair<double, double> z = make_pair(a, b);
      if (binary_search(v.begin() + i, v.begin() + j + 1, z)) ans++;
    }
  }
  cout << ans;
}
