#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double _x, double _y) : x(_x), y(_y) {}
  bool operator<(point other) const {
    if (fabs(x - other.x) > 1e-9) return x < other.x;
    return y < other.y;
  }
  bool operator==(point other) const {
    return (fabs(x - other.x) < 1e-9 && (fabs(y - other.y) < 1e-9));
  }
};
double dis(point p1, point p2) { return hypot(p1.x - p2.x, p1.y - p2.y); }
point halfWay(double x1, double y1, double x2, double y2) {
  point p;
  p.x = (x1 + x2) / 2;
  p.y = (y1 + y2) / 2;
  return p;
}
struct line {
  double a, b, c;
};
void pointsToLine(point p1, point p2, line &l) {
  if (fabs(p1.x - p2.x) < 1e-9) {
    l.a = 1.0;
    l.b = 0.0;
    l.c = -p1.x;
  } else {
    l.a = -(double)(p1.y - p2.y) / (p1.x - p2.x);
    l.b = 1.0;
    l.c = -(double)(l.a * p1.x) - p1.y;
  }
}
void penLine(line &l, point p) {
  double d = l.b;
  l.c = (l.a * p.y - l.b * p.x);
  l.b = -1 * l.a;
  l.a = d;
}
bool areParallel(line l1, line l2) {
  return ((fabs(l1.a - l2.a) < 1e-9) && (fabs(l1.b - l2.b) < 1e-9));
}
bool areSame(line l1, line l2) {
  return areParallel(l1, l2) && (fabs(l1.c - l2.c) < 1e-9);
}
bool areIntersect(line l1, line l2, point &p) {
  if (areParallel(l1, l2)) return false;
  p.x = (l2.b * l1.c - l1.b * l2.c) / (l2.a * l1.b - l1.a * l2.b);
  if (fabs(l1.b) > 1e-9)
    p.y = -(l1.a * p.x + l1.c);
  else
    p.y = -(l2.a * p.x + l2.c);
  return true;
}
struct vec {
  double x, y;
  vec(double _x, double _y) : x(_x), y(_y) {}
};
vec toVec(point p1, point p2) { return vec(p2.x - p1.x, p2.y - p1.y); }
vec scale(vec v, double s) { return vec(v.x * s, v.y * s); }
point translate(point p, vec v) { return point(p.x + v.x, p.y + v.y); }
double cp(vec a, vec b) { return a.x * b.y - a.y * b.x; }
double disToLine(point a, point b, point c) {
  double diss = cp(toVec(a, b), toVec(a, c)) / dis(a, b);
  return fabs(diss);
}
bool ccw(point p, point q, point r) { return cp(toVec(p, q), toVec(p, r)) > 0; }
bool colinear(point p, point q, point r) {
  return fabs(cp(toVec(p, q), toVec(p, r))) < 1e-9;
}
int chickCollission(int a, int b, int c, int x, int y, int radius) {
  int dist = (abs(a * x + b * y + c)) / sqrt(a * a + b * b);
  if (radius == dist)
    return 0;
  else if (radius == dist)
    return 1;
  else
    return -1;
}
int circle(int x1, int y1, int x2, int y2, int r1, int r2) {
  int distSq = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
  int radSumSq = (r1 + r2) * (r1 + r2);
  if (distSq == radSumSq)
    return 0;
  else if (distSq > radSumSq)
    return -1;
  else
    return 1;
}
int main() {
  int n, i;
  double x1, x2, x3, y1, y2, y3, r;
  line l1, l2;
  cin >> n;
  map<point, int> m;
  vector<point> medps;
  vector<point> ps(n);
  i = n;
  while (i--) {
    point p;
    cin >> p.x >> p.y;
    ps[i] = p;
  }
  for (int i = 0; i < n; i++) {
    for (int j = (i + 1); j < n; j++) {
      point p;
      p = halfWay(ps[i].x, ps[i].y, ps[j].x, ps[j].y);
      m[p]++;
    }
  }
  int c = 0;
  for (map<point, int>::iterator it = m.begin(); it != m.end(); ++it)
    c += it->second * (it->second - 1) / 2;
  cout << c;
  return 0;
}
