#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, count = 0;
  cin >> n;
  pair<int, int> a[3005];
  set<pair<int, int>> s;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    a[i] = pair<int, int>(x, y);
    s.insert(a[i]);
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      x = a[i].first + a[j].first;
      y = a[i].second + a[j].second;
      if (x % 2 == 0 && y % 2 == 0) {
        x /= 2;
        y /= 2;
        count += (s.find(pair<int, int>(x, y)) != s.end());
      }
    }
  }
  cout << count << endl;
  return 0;
}
