#include <bits/stdc++.h>
using namespace std;
const long long int MAXN = 1e6 + 1;
map<double, map<double, long long int>> mp;
pair<long long int, long long int> a[3000];
signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int n, i, j;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      mp[(a[i].first + a[j].first) / 2.0][(a[i].second + a[j].second) / 2.0]++;
    }
  }
  long long int sum = 0;
  for (auto itr = mp.begin(); itr != mp.end(); itr++) {
    for (auto ptr = itr->second.begin(); ptr != itr->second.end(); ptr++) {
      long long int cc = ptr->second;
      sum += ((cc - 1) * cc) / 2;
    }
  }
  cout << sum << "\n";
}
