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>
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("O3")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("Ofast")
using namespace std;
const int INF = 1e9 + 10;
const long long INFll = 2e18;
const int BASE1 = 179;
const int BASE2 = 653;
const long long MOD = 998244353;
const int MAXA = 2000001;
const int MAXN = 2e5 + 1;
const int MAXLOG = 22;
const long long COST = 1000 * 1000 * 1000;
const long double PI = 3.1415926535;
const long double EPS = 1e-15;
void solve() {
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  for (int i = 0; i < (n); i++) cin >> x[i] >> y[i];
  map<pair<int, int>, int> cnt;
  for (int i = 0; i < (n); i++) {
    for (int j = i + 1; j < n; j++) {
      pair<int, int> p = make_pair(x[i] + x[j], y[i] + y[j]);
      if (cnt.find(p) != cnt.end())
        cnt[p]++;
      else
        cnt[p] = 1;
    }
  }
  long long res = 0;
  for (auto p : cnt) res += (long long)p.second * (p.second - 1) / 2;
  cout << res << "\n";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
