#include <bits/stdc++.h>
using namespace std;
pair<double, double> p[2000 + 5];
int n;
vector<pair<double, double> > line;
map<pair<double, double>, long long> mymap;
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> p[i].first >> p[i].second;
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      line.push_back({p[i].first + p[j].first, p[i].second + p[j].second});
  for (auto x : line) mymap[x]++;
  long long res = 0;
  for (auto x : mymap) res = res + (x.second * (x.second - 1)) / 2;
  cout << res;
}
