#include <bits/stdc++.h>
using namespace std;
long long powmod(long long base, long long exp, long long MOD) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % MOD;
    base = (base * base) % MOD;
    exp /= 2;
  }
  return (res % MOD);
}
const long long N = 2e5 + 3;
const long long mod = 1e8;
long long distance(pair<long long, long long> a, pair<long long, long long> b) {
  return (a.first - b.first) * (a.first - b.first) +
         (a.second - b.second) * (a.second - b.second);
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  pair<long long, long long> c[n];
  for (long long i = 0; i < n; i++) cin >> c[i].first >> c[i].second;
  long long ans = 0;
  map<pair<long long, long long>, long long> m;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      long long x = (c[i].first + c[j].first), y = (c[i].second + c[j].second);
      m[{x, y}]++;
    }
  }
  for (auto x : m) {
    ans += (x.second) * (x.second - 1) >> 1;
  }
  cout << ans;
  return 0;
}
