#include <bits/stdc++.h>
int point[3001][2];
int board[4005][4005];
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> point[i][0] >> point[i][1];
    board[2001 + 2 * point[i][0]][2001 + 2 * point[i][1]] = 1;
  }
  int sx, sy, ans = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (i != j) {
        sx = point[i][0] + point[j][0];
        sy = point[i][1] + point[j][1];
        if (board[2001 + sx][2001 + sy]) ans++;
      }
  cout << ans / 2 << endl;
  return 0;
}
