#include <bits/stdc++.h>
const double eps = 1e-9;
const int int_inf = 2000000000;
const long long i64_inf = 1000000000000000000LL;
const double pi = acos(-1.0);
using namespace std;
int n;
int x[4000];
int y[4000];
bool t[4000][4000];
int main() {
  memset(t, 0, sizeof(t));
  cin >> n;
  for (int i = 0; i < (int)n; i++)
    scanf("%d%d", &x[i], &y[i]), x[i] += 1000, y[i] += 1000, t[x[i]][y[i]] = 1;
  int res = 0;
  for (int i = 0; i < (int)n; i++)
    for (int j = i + 1; j < (int)n; j++) {
      int xx = (x[i] + x[j]) / 2;
      if ((x[i] + x[j]) % 2 == 1) continue;
      int yy = (y[i] + y[j]) / 2;
      if ((y[i] + y[j]) % 2 == 1) continue;
      res += t[xx][yy];
    }
  cout << res << endl;
  return 0;
}
