#include <bits/stdc++.h>
using namespace std;
long long powmod(long long base, long long exp, long long MOD) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % MOD;
    base = (base * base) % MOD;
    exp /= 2;
  }
  return (res % MOD);
}
const long long N = 2e5 + 3;
const long long mod = 1e8;
long long distance(pair<long long, long long> a, pair<long long, long long> b) {
  return (a.first - b.first) * (a.first - b.first) +
         (a.second - b.second) * (a.second - b.second);
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  pair<long long, long long> c[n];
  for (long long i = 0; i < n; i++) cin >> c[i].first >> c[i].second;
  long long ans = 0;
  map<pair<long long, long long>, long long> m;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      long long x = (c[i].first + c[j].first), y = (c[i].second + c[j].second);
      m[{x, y}]++;
    }
  }
  for (auto x : m) {
    ans += (x.second) * (x.second - 1) >> 1;
  }
  cout << ans;
  return 0;
}

### Prompt

Your task is to create a cpp solution to the following problem:

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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long powmod(long long base, long long exp, long long MOD) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % MOD;
    base = (base * base) % MOD;
    exp /= 2;
  }
  return (res % MOD);
}
const long long N = 2e5 + 3;
const long long mod = 1e8;
long long distance(pair<long long, long long> a, pair<long long, long long> b) {
  return (a.first - b.first) * (a.first - b.first) +
         (a.second - b.second) * (a.second - b.second);
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  pair<long long, long long> c[n];
  for (long long i = 0; i < n; i++) cin >> c[i].first >> c[i].second;
  long long ans = 0;
  map<pair<long long, long long>, long long> m;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      long long x = (c[i].first + c[j].first), y = (c[i].second + c[j].second);
      m[{x, y}]++;
    }
  }
  for (auto x : m) {
    ans += (x.second) * (x.second - 1) >> 1;
  }
  cout << ans;
  return 0;
}

```