#include <bits/stdc++.h>
using namespace std;
const short maxsize = 2250;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<pair<short, short>> a(n);
  vector<vector<short>> mp(2 * maxsize, vector<short>(2 * maxsize, 0));
  for (int i = 0; i < n; i++) {
    short x = 1000, y = -1000;
    cin >> x >> y;
    x--;
    y--;
    mp[2 * x + maxsize][2 * y + maxsize]++;
    a[i] = make_pair(x, y);
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++)
      ans += mp[(a[i].first + a[j].first) + maxsize]
               [(a[i].second + a[j].second) + maxsize];
  }
  cout << ans;
  return 0;
}
