#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
int n, x[N], y[N], a[N][N];
int main() {
  scanf("%d", &n);
  for (auto i = 1; i <= n; i++)
    scanf("%d%d", &x[i], &y[i]), a[x[i] + 1000][y[i] + 1000] = 1;
  int ans = 0;
  for (auto i = 1; i <= n; i++)
    for (auto j = i + 1; j <= n; j++) {
      int u = x[i] + x[j], v = y[i] + y[j];
      if (u % 2 == 0 && v % 2 == 0) {
        u /= 2;
        v /= 2;
        if (-1000 <= u && u <= 1000 && -1000 <= v && v <= 1000)
          ans += a[u + 1000][v + 1000];
      }
    }
  cout << ans << endl;
  return 0;
}
