#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
map<pair<int, int>, int> mp;
int n;
pair<int, int> a[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i].first >> a[i].second;
  }
  sort(a, a + n);
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      pair<int, int> dif = {a[i].first - a[j].first, a[i].second - a[j].second};
      mp[dif]++;
    }
  }
  long long ans = 0;
  for (auto it : mp) {
    long long cur = it.second;
    ans += (cur * (cur - 1)) / 2;
  }
  cout << ans / 2 << endl;
  return 0;
}
