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;
void yesNo(bool ck) { cout << (ck ? "YES\n" : "NO\n"); }
long long toInt(string s) {
  stringstream ss;
  ss << s;
  int n;
  ss >> n;
  return n;
}
string toString(long long n) {
  stringstream ss;
  ss << n;
  string s;
  ss >> s;
  return s;
}
string UPPER(string s) {
  transform(s.begin(), s.end(), s.begin(), ::toupper);
  return s;
}
string LOWER(string s) {
  transform(s.begin(), s.end(), s.begin(), ::tolower);
  return s;
}
bool isDigit(char ch) {
  if (ch >= 48 && ch <= 57)
    return true;
  else
    return false;
}
vector<long long> removeDup(vector<long long> v) {
  sort(v.begin(), v.end());
  v.resize(distance(v.begin(), unique(v.begin(), v.end())));
  return v;
}
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E') {
    return true;
  }
  return false;
}
bool isCons(char ch) {
  if (isalpha(ch) && !isVowel(ch)) {
    return true;
  }
  return false;
}
const long long p = 29;
const long long N = 2e6 + 50;
const long long mod = 1e9 + 7;
long long nCr(long long n, long long r) {
  long long res = 1;
  if (r > (n - r)) {
    r = n - r;
  }
  for (long long i = 0; i < r; i++) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
int main() {
  long long t = 1;
  for (long long T = 1; T <= t; T++) {
    long long n;
    cin >> n;
    long long x[n + 5], y[n + 5];
    for (long long i = 0; i < n; i++) {
      cin >> x[i] >> y[i];
    }
    map<pair<double, double>, long long> mp;
    for (long long i = 0; i < n; i++) {
      for (long long j = i + 1; j < n; j++) {
        double mid_x = (x[i] + x[j]) / 2.0;
        double mid_y = (y[i] + y[j]) / 2.0;
        mp[{mid_x, mid_y}]++;
      }
    }
    long long res = 0;
    for (auto it : mp) {
      if (it.second > 1) {
        res += nCr(it.second, 2);
      }
    }
    cout << res << "\n";
  }
  return 0;
}
