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>
template <typename T>
T Abs(T a) {
  return a < 0 ? -a : a;
}
template <typename T>
T Max(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
T Min(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
T Gcd(T a, T b) {
  return (!b) ? a : Gcd(b, a % b);
}
template <typename T>
T Pow(T a, T b) {
  if (!b) return 1;
  T t = Pow(a, b / 2);
  return b % 2 ? a * t * t : t * t;
}
template <typename T>
inline void read(T &x) {
  T f = 1;
  char c;
  x = 0;
  for (c = getchar(); c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
using fl = float;
using db = double;
using ll = long long;
using ull = unsigned long long;
const int mx = 1000005;
const int inf = 99999999;
const int intlim = 2147483648;
const db PI = acos(-1);
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  pair<int, int> a[n];
  for (int i = 0; i < n; ++i) scanf("%d %d", &a[i].first, &a[i].second);
  std::map<pair<ll, ll>, int> mp;
  for (int i = 0; i < n - 1; ++i)
    for (int j = i + 1; j < n; ++j)
      mp[{a[i].first + a[j].first, a[i].second + a[j].second}]++;
  ll ans = 0;
  for (auto x : mp) ans += (x.second - 1) * (x.second) / 2;
  cout << ans << '\n';
  return 0;
}
