#include <bits/stdc++.h>
using namespace std;
int n, ans;
bool c[2019][2019];
pair<int, int> a[3005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    x += 1005;
    y += 1005;
    c[x][y] = 1;
    pair<int, int> p = make_pair(x, y);
    a[i] = p;
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int x, y, x1, asdfghjkl;
      x = a[i].first;
      y = a[i].second;
      x1 = a[j].first;
      asdfghjkl = a[j].second;
      if ((x + x1) % 2 || (y + asdfghjkl) % 2)
        continue;
      else {
        int x3 = (x + x1) / 2;
        int y3 = (y + asdfghjkl) / 2;
        if (c[x3][y3]) ans++;
      }
    }
  }
  cout << ans;
}
