#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
const int INF = 0x3f3f3f3f;
struct Node {
  int x, y;
  bool operator<(const Node &rhs) const {
    if (x != rhs.x) return x < rhs.x;
    return y < rhs.y;
  }
} o[N];
map<Node, int> mp;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &o[i].x, &o[i].y);
  int ans = 0;
  for (int i = 1; i < n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      Node tmp;
      tmp.x = (o[i].x + o[j].x);
      tmp.y = (o[i].y + o[j].y);
      if (mp.find(tmp) == mp.end())
        mp[tmp] = 1;
      else
        ans += mp[tmp]++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
