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 int MAXN = 2e6 + 10, MAXM = 4e6 + 10;
const int INF = INT_MAX, SINF = 0x3f3f3f3f;
const long long llINF = LLONG_MAX;
const int MOD = 1e9 + 7, mod = 998244353;
const int inv2 = 5e8 + 4;
int n;
map<pair<double, long long>, int> mp;
map<long long, int> Y;
int x[MAXN], y[MAXN], ans;
long long getd(long long x1, long long x2, long long y1, long long y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
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 = i + 1; j <= n; j++) {
      if (x[i] == x[j]) {
        ans += Y[abs(y[i] - y[j])];
        Y[abs(y[j] - y[i])]++;
      } else {
        pair<double, long long> tmp = {(double)(y[i] - y[j]) / (x[i] - x[j]),
                                       getd(x[i], x[j], y[i], y[j])};
        ans += mp[tmp];
        mp[tmp]++;
      }
    }
  cout << ans / 2;
  return 0;
}
