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;
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
#pragma GCC target("avx")
const long long INF = numeric_limits<long long>::max();
const long double PI = 3.1415926535898;
const long long MOD = 1000000007;
const long long LIM = 100005;
long long fpow(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = fpow(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long modInverse(long long n, long long p) { return fpow(n, p - 2); }
map<long long, long long> primeFactors(long long n) {
  map<long long, long long> mp;
  while (n % 2 == 0) {
    if (mp.count(2) == 1)
      mp[2]++;
    else
      mp.insert({2, 1});
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      if (mp.count(i) == 1)
        mp[i]++;
      else
        mp.insert({i, 1});
      n = n / i;
    }
  }
  if (n > 2) {
    if (mp.count(n) == 1)
      mp[n]++;
    else
      mp.insert({n, 1});
  }
  return mp;
}
long long getDistance(pair<long long, long long> p1,
                      pair<long long, long long> p2) {
  return (p1.first - p2.first) * (p1.first - p2.first) +
         (p1.second - p2.second) * (p1.second - p2.second);
}
void solve() {
  long long n, ans = 0;
  cin >> n;
  vector<pair<long long, long long>> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      pair<long long, long long> p1 = v[i], p2 = v[j];
      if (p1.second > p2.second) swap(p1, p2);
      long double slp = atan2(p2.second - p1.second, p2.first - p1.first);
      if (p1.second == p2.second) slp = 0.0;
      long long dist = getDistance(v[i], v[j]);
      mp[slp * 1e15 + dist]++;
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      pair<long long, long long> p1 = v[i], p2 = v[j];
      if (p1.second > p2.second) swap(p1, p2);
      long double slp = atan2(p2.second - p1.second, p2.first - p1.first);
      if (p1.second == p2.second) slp = 0.0;
      long long dist = getDistance(v[i], v[j]);
      ans += mp[slp * 1e15 + dist] - 1;
    }
  }
  assert(ans % 4 == 0);
  ans /= 4;
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  { solve(); }
  return 0;
}
