#include <bits/stdc++.h>
using namespace std;
int n;
struct point {
  int x, y;
  point(int x = 0, int y = 0) : x(x), y(y) {}
} s[2020];
point operator+(point a, point b) { return point(a.x + b.x, a.y + b.y); }
point operator-(point a, point b) { return point(a.x - b.x, a.y - b.y); }
map<pair<int, int>, int> mp;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &s[i].x, &s[i].y);
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      point v = s[i] - s[j];
      if (v.x == 0 && v.y < 0)
        v.y = -v.y;
      else if (v.x < 0)
        v.x = -v.x, v.y = -v.y;
      ans += mp[make_pair(v.x, v.y)];
      mp[make_pair(v.x, v.y)]++;
    }
  }
  printf("%I64d\n", ans / 2);
  return 0;
}
