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 long double PI = 3.1415926535897932384626;
const long long int MAX = 1000000000 + 7;
const int INF = 0x3f3f3f3f;
pair<double, double> p[2004];
pair<double, double> get_mid(int pos1, int pos2) {
  double x = (p[pos1].first + p[pos2].first) / 2.0;
  double y = (p[pos1].second + p[pos2].second) / 2.0;
  return make_pair(x, y);
}
int main(int argc, char const *argv[]) {
  int n;
  cin >> (n);
  std::map<pair<double, double>, int> cnt;
  for (int i = 0; i < n; i++) {
    scanf("%lf", &p[i].first);
    scanf("%lf", &p[i].second);
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      cnt[get_mid(i, j)]++;
    }
  }
  long long int ans = 0;
  for (__typeof((cnt).begin()) it = (cnt).begin(); it != (cnt).end(); it++) {
    ans += ((it->second) * (it->second - 1)) / 2;
  }
  cout << ans << endl;
  return 0;
}
