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;
long long n;
vector<pair<long long, long long>> v;
map<long long, vector<long long>> mp;
long long slope(long long x1, long long y1, long long x2, long long y2) {
  long long dy = y2 - y1, dx = x2 - x1;
  long long neg = dy * dx;
  if (neg < 0)
    neg = 1;
  else
    neg = 0;
  dy = abs(dy);
  dx = abs(dx);
  if (dy == 0)
    dx = 0;
  else if (dx == 0)
    dy = 1;
  if (neg) dy *= -1;
  return 4000000000 * dy + dx;
}
long long dis(long long x1, long long y1, long long x2, long long y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
long long nc2(long long r) {
  if (r <= 1) return 0;
  return (r * (r - 1)) / 2;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < i; j++) {
      long long sl = slope(v[i].first, v[i].second, v[j].first, v[j].second);
      mp[sl].push_back(dis(v[i].first, v[i].second, v[j].first, v[j].second));
    }
  }
  long long ans = 0;
  for (auto v : mp) {
    map<long long, long long> cnt;
    for (long long x : v.second) {
      if (cnt.count(x) == 0)
        cnt[x] = 1;
      else
        cnt[x]++;
    }
    for (auto x : cnt) {
      ans += nc2(x.second);
    }
  }
  cout << ans / 2;
}
