#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int IT_MAX = 1 << 17;
const long long MOD = 20150523;
const int INF = 2034567890;
const long long LL_INF = 1234567890123456789ll;
const double PI = acos(-1);
const long double ERR = 1E-8;
int in[2050][2];
vector<pair<int, int> > V;
int main() {
  int N, i, j;
  scanf("%d", &N);
  for (i = 1; i <= N; i++) scanf("%d %d", &in[i][0], &in[i][1]);
  for (i = 1; i <= N; i++) {
    for (j = 1; j < i; j++) {
      pair<int, int> u =
          pair<int, int>(in[i][0] - in[j][0], in[i][1] - in[j][1]);
      if (u.first < 0) {
        u.first *= -1;
        u.second *= -1;
      }
      if (u.first == 0 && u.second < 0) {
        u.first *= -1;
        u.second *= -1;
      }
      V.push_back(u);
    }
  }
  sort(V.begin(), V.end());
  long long ans = 0;
  int st = 0;
  for (i = 0; i < V.size(); i++) {
    if (i + 1 == V.size() || V[i + 1] != V[st]) {
      ans += (long long)(i + 1 - st) * (i + 1 - st - 1) / 2;
      st = i + 1;
    }
  }
  printf("%lld\n", ans / 2);
  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>
#pragma warning(disable : 4996)
using namespace std;
int IT_MAX = 1 << 17;
const long long MOD = 20150523;
const int INF = 2034567890;
const long long LL_INF = 1234567890123456789ll;
const double PI = acos(-1);
const long double ERR = 1E-8;
int in[2050][2];
vector<pair<int, int> > V;
int main() {
  int N, i, j;
  scanf("%d", &N);
  for (i = 1; i <= N; i++) scanf("%d %d", &in[i][0], &in[i][1]);
  for (i = 1; i <= N; i++) {
    for (j = 1; j < i; j++) {
      pair<int, int> u =
          pair<int, int>(in[i][0] - in[j][0], in[i][1] - in[j][1]);
      if (u.first < 0) {
        u.first *= -1;
        u.second *= -1;
      }
      if (u.first == 0 && u.second < 0) {
        u.first *= -1;
        u.second *= -1;
      }
      V.push_back(u);
    }
  }
  sort(V.begin(), V.end());
  long long ans = 0;
  int st = 0;
  for (i = 0; i < V.size(); i++) {
    if (i + 1 == V.size() || V[i + 1] != V[st]) {
      ans += (long long)(i + 1 - st) * (i + 1 - st - 1) / 2;
      st = i + 1;
    }
  }
  printf("%lld\n", ans / 2);
  return 0;
}

```