#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 3;
const long long MOD = 1e9 + 7;
const long long oo = 1e18;
pair<long double, long double> p[N];
int n;
map<pair<long double, long double>, long long> cnt;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  long double _x, _y;
  for (int i = 1; i <= n; i++) {
    cin >> _x >> _y;
    p[i] = {_x, _y};
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i - 1; j++) {
      cnt[{(p[i].first + p[j].first) / 2.0,
           (p[i].second + p[j].second) / 2.0}]++;
    }
  long long ans = 0;
  for (auto v : cnt) ans += (v.second * (v.second - 1) / 2);
  cout << ans;
  return 0;
}
