#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 1;
const long long INF = 1e9 + 1;
const long long MOD = 1e9;
const long long BITS = 64;
const long double EPS = 1e-12;
void bye() {
  cout << "\n";
  exit(0);
}
struct Point {
  long long x, y;
};
bool operator<(Point a, Point b) {
  return a.x < b.x || (a.x == b.x && a.y < b.y);
}
map<Point, long long> mp;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<Point> g(n);
  for (long long i = 0; i < n; i++) {
    cin >> g[i].x >> g[i].y;
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      Point m = {(g[i].x + g[j].x), (g[i].y + g[j].y)};
      mp[m]++;
    }
  }
  for (auto v : mp) {
    ans += (v.second * (v.second - 1)) / 2;
  }
  cout << ans;
  bye();
}
