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 EPS = 1e-9;
const long double PI = atan(1) * 4;
const long long M = 1000000007;
struct PT {
  double x, y;
  PT() {}
  PT(double x, double y) : x(x), y(y) {}
  PT(const PT &p) : x(p.x), y(p.y) {}
  PT operator+(const PT &p) const { return PT(x + p.x, y + p.y); }
  PT operator-(const PT &p) const { return PT(x - p.x, y - p.y); }
  PT operator*(double c) const { return PT(x * c, y * c); }
  PT operator/(double c) const { return PT(x / c, y / c); }
};
double dot(PT p, PT q) { return p.x * q.x + p.y * q.y; }
double dist2(PT p, PT q) { return dot(p - q, p - q); }
double cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
double cos_u2v(const PT &u, const PT &v) {
  return dot(u, v) / sqrt(dot(u, u) * dot(v, v));
}
double sin_u2v(const PT &u, const PT &v) {
  return cross(u, v) / sqrt(dot(u, u) * dot(v, v));
}
ostream &operator<<(ostream &os, const PT &p) {
  os << "(" << p.x << "," << p.y << ")";
}
double vector2angle(const PT &v) { return atan2(v.y, v.x); }
long long mod(long long x, long long m) { return ((x % m) + m) % m; }
long long gcd(long long a, long long b) {
  for (; b > 0; swap(a, b)) a %= b;
  return a;
}
pair<long long, long long> clean_vector(long long dx, long long dy) {
  long long g = gcd(abs(dx), abs(dy));
  dx /= g;
  dy /= g;
  if (dy < 0) {
    dy = -dy;
    dx = -dx;
  }
  if (dy == 0) dx = 1;
  return make_pair(dx, dy);
}
const int N = 2000;
long long x[N];
long long y[N];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
  }
  map<tuple<long long, long long, long long>, long long> d;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      long long vx, vy, sl;
      long long dx = x[j] - x[i];
      long long dy = y[j] - y[i];
      tie(vx, vy) = clean_vector(dx, dy);
      sl = dx * dx + dy * dy;
      d[make_tuple(vx, vy, sl)] += 1;
    }
  }
  long long ans = 0;
  for (auto pr : d) {
    auto segn = pr.second;
    ans += segn * (segn - 1) / 2;
  }
  cout << ans / 2 << endl;
  return 0;
}
