#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n, x[N], y[N];
long long res;
map<pair<double, double>, long long> M;
vector<pair<int, int> > V;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (i != j) V.push_back(make_pair(x[j] - x[i], y[j] - y[i]));
  sort(V.begin(), V.end());
  long long cnt = 0;
  for (int i = 1; i < V.size(); i++) {
    if (V[i] == V[i - 1])
      res += (++cnt);
    else
      cnt = 0;
  }
  cout << res / 4;
  return 0;
}
