#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
vector<pair<double, double> > a;
int main() {
  int n, x, y, i, j, t = 1, ans = 0;
  double t1, t2;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    scanf("%d", &y);
    pair<int, int> p;
    p = make_pair(x, y);
    v.push_back(p);
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      t1 = (v[i].first + v[j].first) / 2.0;
      t2 = (v[i].second + v[j].second) / 2.0;
      pair<double, double> q;
      q = make_pair(t1, t2);
      a.push_back(q);
    }
  }
  sort(a.begin(), a.end());
  for (i = 1; i < a.size(); i++) {
    if (a[i].first == a[i - 1].first && a[i].second == a[i - 1].second) {
      t++;
    } else {
      ans += (t * (t - 1)) / 2;
      t = 1;
    }
  }
  ans += (t * (t - 1)) / 2;
  cout << ans;
  return 0;
}
