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 pi = acos(-1.0);
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long mod = 1e9 + 7;
map<pair<double, double>, int> mp;
map<pair<double, double>, int>::iterator it;
pair<double, double> point[2000];
long long nr[1001][1001];
long long ncr(long long n, long long r) {
  if (n == r) return nr[n][r] = 1;
  if (r == 0) return nr[n][r] = 1;
  if (r == 1) return nr[n][r] = n;
  if (nr[n][r] != -1) return nr[n][r];
  return nr[n][r] = (ncr(n - 1, r) + ncr(n - 1, r - 1));
}
int main() {
  int t = 1, tc = 1, n;
  while (t--) {
    mp.clear();
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%lf", &point[i].first);
      ;
      scanf("%lf", &point[i].second);
      ;
    }
    double x1, x2, y1, y2, dis, slope;
    for (int i = 0; i < n; i++) {
      x1 = point[i].first;
      y1 = point[i].second;
      for (int j = i + 1; j < n; j++) {
        x2 = point[j].first;
        y2 = point[j].second;
        dis = sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
        slope = (y2 - y1) / (x2 - x1);
        mp[make_pair((x1 + x2) / 2.0, (y1 + y2) / 2)]++;
      }
    }
    long long ans = 0;
    int c = 0;
    for (it = mp.begin(); it != mp.end(); it++) {
      double xx = (it->first).first;
      double xx2 = (it->first).second;
      int yy = it->second;
      ans += ((yy * (yy - 1)) / 2);
    }
    cout << ans << endl;
  }
  return 0;
}
