#include <bits/stdc++.h>
using namespace std;
int N;
struct Pt {
  int x, y;
  Pt(int x, int y) : x(x), y(y){};
};
vector<Pt> pt;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
struct SlopeDist {
  int x, y, dist;
  SlopeDist(int x, int y, int dist) : x(x), y(y), dist(dist) {}
  bool operator<(const SlopeDist& ob) const {
    if (ob.x != x) return x < ob.x;
    if (ob.y != y) return y < ob.y;
    return dist < ob.dist;
  }
};
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    pt.emplace_back(x, y);
  }
  map<SlopeDist, int> m;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      int _i = i, _j = j;
      if (pt[i].x > pt[j].x) {
        swap(_i, _j);
      } else if (pt[i].x == pt[j].x && pt[i].y > pt[j].y) {
        swap(_i, _j);
      }
      int x = pt[_i].x - pt[_j].x;
      int y = pt[_i].y - pt[_j].y;
      if (y < 0) {
        x *= -1;
        y *= -1;
      }
      SlopeDist slopeDist(x, y, 0);
      m[slopeDist]++;
    }
  }
  long long ret = 0;
  for (auto& p : m) {
    ret += (p.second) * (p.second - 1) / 2;
  }
  printf("%lld", ret / 2);
}
