#include <bits/stdc++.h>
using namespace std;
const int N = 3003;
bool a[N][N];
int p[N][2];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> p[i][0] >> p[i][1];
    p[i][0] += 1000, p[i][1] += 1000;
    a[p[i][0]][p[i][1]] = 1;
  }
  int cnt = 0;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      cnt += (i != j && (p[i][0] + p[j][0]) % 2 == 0 &&
              (p[i][1] + p[j][1]) % 2 == 0 &&
              a[(p[i][0] + p[j][0]) / 2][(p[i][1] + p[j][1]) / 2]);
  cout << cnt / 2 << '\n';
  return 0;
}
