#include <bits/stdc++.h>
using namespace std;
int ans[3003][3000];
int main() {
  int n;
  scanf("%d", &n);
  int x[3003], y[3003];
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    ans[x[i] + 1000][y[i] + 1000] = 1;
  }
  int a[3003], b[3003];
  int k = 0;
  int sum = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if ((x[i] + x[j]) % 2 == 0 && (y[i] + y[j]) % 2 == 0) {
        a[k] = (x[i] + x[j]) / 2;
        b[k] = (y[i] + y[j]) / 2;
        if (ans[a[k] + 1000][b[k] + 1000] == 1) {
          sum++;
        }
      }
    }
  }
  printf("%d\n", sum);
}
