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 double pi = acos(-1);
struct Point {
  long long int x;
  long long int y;
};
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
unordered_map<int, unordered_map<int, int, custom_hash>, custom_hash> cnt;
unordered_map<int, int, custom_hash> temp;
int main() {
  cnt.reserve(1 << 20);
  cnt.max_load_factor(0.25);
  temp.reserve(512);
  temp.max_load_factor(0.25);
  int t = 1, cas = 1;
  while (t--) {
    int n;
    cin >> n;
    Point arr[n + 5];
    for (int i = 0; i < n; i++) {
      cin >> arr[i].x >> arr[i].y;
    }
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        long long int xx = arr[i].x + arr[j].x;
        long long int yy = arr[i].y + arr[j].y;
        Point p = {xx, yy};
        cnt[xx][yy]++;
      }
    }
    long long int ans = 0;
    for (auto i : cnt) {
      temp = i.second;
      for (auto j : temp) ans += (j.second * (j.second - 1)) / 2;
    }
    cnt.clear();
    cout << ans << endl;
  }
  return 0;
}
