#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int>> a(n);
  map<pair<int, int>, long long> c;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i].first, &a[i].second);
    for (int j = 0; j < i; j++) {
      int x = (int)2 * (double)(a[i].first + a[j].first) / 2;
      int y = (int)2 * (double)(a[i].second + a[j].second) / 2;
      c[make_pair(x, y)]++;
    }
  }
  long long ans = 0;
  for (auto it = c.begin(); it != c.end(); it++)
    ans += (it->second - 1) * (it->second) / 2;
  cout << ans;
  return 0;
}
