#include <bits/stdc++.h>
const int intINF = 999999999;
const long long i64INF = 99999999999999999ll;
const double doubleINF = 9999999999.;
using namespace std;
struct dot {
  int x, y;
};
dot d[3033];
bool is[2011][2011];
int n;
int abs(int a) {
  if (a < 0) a *= -1;
  return a;
}
bool check(int i, int j) {
  int x1 = d[i].x, x2 = d[j].x, y1 = d[i].y, y2 = d[j].y;
  int dx = x1 + x2, dy = y1 + y2;
  if (dx % 2 == 1 || dy % 2 == 1) return false;
  dx /= 2;
  dy /= 2;
  return is[dx][dy];
}
int main() {
  int cx, cy;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &cx, &cy);
    cx += 1001;
    cy += 1001;
    is[cx][cy] = true;
    d[i].x = cx;
    d[i].y = cy;
  }
  int ct = 0;
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++)
      if (check(i, j)) ct++;
  printf("%d\n", ct);
  return 0;
}
