#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long mod = 1e9 + 7;
pair<double, double> point[2000];
vector<pair<double, double> > v;
int main() {
  int t = 1, tc = 1, n;
  while (t--) {
    v.clear();
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%lf", &point[i].first);
      ;
      scanf("%lf", &point[i].second);
      ;
    }
    double x1, x2, y1, y2, dis, slope;
    for (int i = 0; i < n; i++) {
      x1 = point[i].first;
      y1 = point[i].second;
      for (int j = i + 1; j < n; j++) {
        x2 = point[j].first;
        y2 = point[j].second;
        v.push_back(make_pair((x1 + x2), (y1 + y2)));
      }
    }
    long long ans = 0;
    int l = v.size();
    int c = 1;
    sort(v.begin(), v.end());
    for (int i = 1; i < l; i++) {
      x1 = v[i].first;
      y1 = v[i].second;
      y2 = v[i - 1].second;
      x2 = v[i - 1].first;
      if (x1 == x2 && y1 == y2) {
        c++;
      } else {
        ans += ((c * (c - 1)) / 2);
        c = 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
