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