#include <bits/stdc++.h>
using namespace std;
const int mx = (int)2e5 + 6;
map<pair<int, int>, int> point_cnt;
int main() {
  int n;
  cin >> n;
  pair<int, int> point[n + 10];
  for (int i = 0; i < n; i++) {
    cin >> point[i].first >> point[i].second;
  }
  sort(point, point + n);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int mdx = (point[i].first + point[j].first);
      int mdy = (point[i].second + point[j].second);
      point_cnt[make_pair(mdx, mdy)]++;
    }
  }
  int ans = 0;
  for (auto x : point_cnt) {
    int frq = x.second;
    ans += (frq * (frq - 1) / 2);
  }
  cout << ans << '\n';
}
