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