You are given n points on a plane. All the points are distinct and no three of them lie on the same line. Find the number of parallelograms with the vertices at the given points.

Input

The first line of the input contains integer n (1 ≤ n ≤ 2000) — the number of points.

Each of the next n lines contains two integers (xi, yi) (0 ≤ xi, yi ≤ 109) — the coordinates of the i-th point.

Output

Print the only integer c — the number of parallelograms with the vertices at the given points.

Example

Input

4
0 1
1 0
1 1
2 0


Output

1
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const int maxn = 2e3 + 9;
const double pi = 3.14159265358979323846264;
const long long inf = 2e18;
const int mod = 1e9 + 7;
long long x[maxn], y[maxn];
map<long long, vector<double> > pq;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      long long tmp =
          (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]);
      double jk;
      if (x[i] == x[j])
        jk = 2;
      else
        jk = (y[i] - y[j]) * 1.0 / (x[i] - x[j]);
      pq[tmp].push_back(jk);
    }
  }
  long long ans = 0;
  for (map<long long, vector<double> >::iterator it = pq.begin();
       it != pq.end(); ++it) {
    vector<double> &tmp = it->second;
    sort(tmp.begin(), tmp.end());
    int pos = 0;
    while (pos < tmp.size()) {
      double jk = tmp[pos];
      int kl = pos;
      while (pos < tmp.size() && fabs(tmp[pos] - jk) < eps) ++pos;
      kl = pos - kl;
      ans += 1ll * kl * (kl - 1) / 2;
    }
  }
  cout << ans / 2;
  return 0;
}
