#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000LL * 1000 * 1000 + 7;
const int INF = 1e9;
const int BASE = 1e9;
const int MAX = 200002;
const double EPS = 1e-9;
const double PI = acos(-1.);
int n;
struct line {
  int x;
  int y;
  long long dist;
  bool operator<(const line& rsh) const {
    return make_pair(dist, make_pair(x, y)) <
           make_pair(rsh.dist, make_pair(rsh.x, rsh.y));
  }
};
map<line, int> foo;
pair<int, int> a[2002];
int gcd(int x, int y) {
  if (!x) {
    return y;
  }
  return gcd(y % x, x);
}
int main() {
  cin >> n;
  for (int i = (0); i < (n); ++i) {
    cin >> a[i].first >> a[i].second;
  }
  long long ans = 0;
  for (int i = (0); i < (n); ++i) {
    for (int j = (i + 1); j < (n); ++j) {
      int dx = a[i].first - a[j].first;
      int dy = a[i].second - a[j].second;
      if (dx < 0) {
        dx *= -1;
        dy *= -1;
      }
      if (!dx) {
        dy = abs(dy);
      }
      int g = gcd(min(abs(dx), abs(dy)), max(abs(dx), abs(dy)));
      long long dist = 1LL * dx * dx + 1LL * dy * dy;
      dx /= g;
      dy /= g;
      line l = {dx, dy, dist};
      foo[l]++;
    }
  }
  for (int i = (0); i < (n); ++i) {
    for (int j = (i + 1); j < (n); ++j) {
      int dx = a[i].first - a[j].first;
      int dy = a[i].second - a[j].second;
      if (dx < 0) {
        dx *= -1;
        dy *= -1;
      }
      if (!dx) {
        dy = abs(dy);
      }
      int g = gcd(min(abs(dx), abs(dy)), max(abs(dx), abs(dy)));
      long long dist = 1LL * dx * dx + 1LL * dy * dy;
      dx /= g;
      dy /= g;
      line l = {dx, dy, dist};
      ans += foo[l] - 1;
    }
  }
  cout << ans / 4 << endl;
  return 0;
}
