#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
template <class T>
bool get_max(T& a, const T& b) {
  return b > a ? a = b, 1 : 0;
}
template <class T>
bool get_min(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
int n;
struct node {
  int x;
  int y;
} p[3000];
bool v[2001][2001];
int main() {
  int i, j, cnt = 0;
  cin >> n;
  memset(v, 0, sizeof(v));
  for (i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y;
    v[p[i].x + 1000][p[i].y + 1000] = true;
  }
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++)
      if (!((p[i].x + p[j].x) & 1) && !((p[i].y + p[j].y) & 1))
        if (v[(p[i].x + p[j].x) / 2 + 1000][(p[i].y + p[j].y) / 2 + 1000])
          cnt++;
  cout << cnt << endl;
  return 0;
}
