#include <bits/stdc++.h>
using namespace std;
const int MX = 2005;
const int mod = 1e9 + 7;
const long long inf = 1e18;
int x[MX], y[MX];
map<pair<int, int>, int> mp;
map<pair<int, int>, int>::iterator it;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tc, i, j, k, n, m, cs = 1;
  {
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
      scanf("%d%d", &x[i], &y[i]);
    }
    mp.clear();
    for (i = 0; i < n; i++) {
      for (j = i + 1; j < n; j++) {
        int xx = (x[i] + x[j]);
        int yy = (y[i] + y[j]);
        mp[{xx, yy}]++;
      }
    }
    int cnt = 0;
    for (it = mp.begin(); it != mp.end(); it++) {
      cnt += (it->second * (it->second - 1)) / 2;
    }
    printf("%d\n", cnt);
  }
  return 0;
}
