#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long double PI = 3.14159265358979323846;
const long double maxN = 1e10;
long double sqr(long double a) { return a * a; }
struct Point {
  long double x, y;
  Point(long double x0 = 0, long double y0 = 0) {
    this->x = x0;
    this->y = y0;
  }
};
bool operator==(const Point& a, const Point& b) {
  return a.x == b.x && a.y == b.y;
}
bool operator<(const Point& a, const Point& b) {
  return a.x < b.x || (a.x == b.x && a.y < b.y);
}
struct Vector {
  long double x, y;
  Vector(long double x0 = 0, long double y0 = 0) {
    this->x = x0;
    this->y = y0;
  }
  Vector(const Point& A, const Point& B) {
    this->x = B.x - A.x;
    this->y = B.y - A.y;
  }
  long double len() { return sqrt(x * x + y * y); }
  long double angle() const { return atan2(y, x); }
};
Vector operator/(Vector A, long double d) { return Vector(A.x / d, A.y / d); };
Vector operator*(Vector A, long double d) { return Vector(A.x * d, A.y * d); };
Point operator+(Point A, Vector B) { return Point(A.x + B.x, A.y + B.y); }
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
struct Line {
  int a, b, c;
  Line(int a = 0, int b = 0, int c = 0) {
    this->a = a;
    this->b = b;
    this->c = c;
  }
  Line(Point& A, Point& B) {
    Vector AB(A, B);
    b = -AB.x;
    a = AB.y;
    c = -a * A.x - b * A.y;
    int g = gcd(gcd(abs(a), abs(b)), abs(c));
    b /= g;
    a /= g;
    c /= g;
    if (a == 0) a = 0;
    if (b == 0) b = 0;
    if (c == 0) c = 0;
    if (a < 0) {
      a = -a;
      b = -b;
      c = -c;
    } else if (a == 0 && b < 0) {
      b = -b;
      c = -c;
    }
  }
};
istream& operator>>(istream& in, Point& P) { return in >> P.x >> P.y; }
istream& operator>>(istream& in, Vector& P) { return in >> P.x >> P.y; }
istream& operator>>(istream& in, Line& P) { return in >> P.a >> P.b >> P.c; }
ostream& operator<<(ostream& out, Point P) {
  out.precision(20);
  return out << P.x << " " << P.y;
}
ostream& operator<<(ostream& out, Vector P) {
  out.precision(20);
  return out << P.x << " " << P.y << endl;
}
ostream& operator<<(ostream& out, Line P) {
  out.precision(20);
  return out << P.a << " " << P.b << " " << P.c << endl;
}
long double dot_product(const Vector& A, const Vector& B) {
  return A.x * B.x + A.y * B.y;
}
long double cross_product(const Vector& A, const Vector& B) {
  return A.x * B.y - A.y * B.x;
}
long double angle(Vector A, Vector B) {
  return fabs(atan2(cross_product(A, B), dot_product(A, B)));
}
Vector ort(Vector A) { return Vector(-A.y, A.x); }
bool one(long double a, long double b) { return a * b >= 0; }
Vector rotate_v(const Vector& A, long double angle_rad) {
  return Vector((A.x * cos(angle_rad) - A.y * sin(angle_rad)),
                (A.x * sin(angle_rad) + A.y * cos(angle_rad)));
}
signed main() {
  int n;
  cin >> n;
  vector<Point> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  map<vector<long double>, int> cnt;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < i; j++) {
      Vector AB(a[i], a[j]);
      AB = AB / 2;
      Point C = a[i] + AB;
      cnt[{C.x, C.y}]++;
    }
  }
  int ans = 0;
  for (auto e : cnt) ans += e.second * (e.second - 1) / 2;
  cout << ans << "\n";
  return 0;
}
