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;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
inline void gn(long long &x) {
  int sg = 1;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  c == '-' ? (sg = -1, x = 0) : (x = c - '0');
  while ((c = getchar()) >= '0' && c <= '9') x = x * 10 + c - '0';
  x *= sg;
}
inline void gn(int &x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(unsigned long long &x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(double &x) {
  double t;
  scanf("%lf", &t);
  x = t;
}
inline void gn(long double &x) {
  double t;
  scanf("%lf", &t);
  x = t;
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
int x[2010], y[2010], N;
struct p {
  int _x, _y;
} M[2010 * 2010];
bool cmp(p a, p b) {
  if (a._x == b._x) return a._y < b._y;
  return a._x < b._x;
}
int main() {
  gn(N);
  int cnt = 0;
  long long ans = 0;
  for (int i = 0; i < N; i++) gn(x[i]), gn(y[i]);
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      M[cnt]._x = x[i] + x[j];
      M[cnt++]._y = y[i] + y[j];
    }
  }
  sort(M, M + cnt, cmp);
  int tot = 1;
  for (int i = 1; i < cnt; i++) {
    if (M[i]._x == M[i - 1]._x && M[i]._y == M[i - 1]._y)
      tot++;
    else {
      ans += 1LL * tot * (tot - 1) / 2, tot = 1;
    }
  }
  ans += 1LL * tot * (tot - 1) / 2;
  printf("%I64d\n", ans);
  return 0;
}
