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 N = 2e3 + 10;
pair<int, int> arr[N];
map<pair<double, long long>, int> S;
double get(int i, int j) {
  if (arr[j].first == arr[i].first) return 0x3f3f3f3f;
  return ((double)arr[j].second - arr[i].second) /
         (arr[j].first - arr[i].first);
}
long long get_d(int i, int j) {
  return ((long long)arr[j].second - arr[i].second) *
             (arr[j].second - arr[i].second) +
         ((long long)arr[j].first - arr[i].first) *
             (arr[j].first - arr[i].first);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    arr[i] = {a, b};
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      double k = get(i, j);
      long long dist = get_d(i, j);
      S[{k, dist}]++;
    }
  int num = 0;
  for (auto t : S) {
    if (t.second == 2) continue;
    t.second /= 2;
    num += t.second * (t.second - 1) / 2;
  }
  printf("%d", num / 2);
  return 0;
}
