#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > c;
pair<int, int> a[2016];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &a[i].first, &a[i].second);
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      c.push_back({a[j].first - a[i].first, a[j].second - a[i].second});
    }
  }
  sort(c.begin(), c.end());
  int s = c.size();
  int cur_cnt = 1;
  int rez = 0;
  for (int i = 1; i < s; i++) {
    if (c[i] != c[i - 1]) {
      rez += cur_cnt * (cur_cnt - 1) / 2;
      cur_cnt = 0;
    }
    cur_cnt++;
  }
  rez += cur_cnt * (cur_cnt - 1) / 2;
  printf("%d", rez / 2);
  return 0;
}
