#include <bits/stdc++.h>
using namespace std;
set<pair<int, int>> points;
int main() {
  int n;
  cin >> n;
  int input1;
  int input2;
  int count = 0;
  for (int i = 1; i <= n; i++) {
    cin >> input1;
    cin >> input2;
    points.insert(make_pair(input1, input2));
  }
  for (auto itr1 = points.begin(); itr1 != points.end(); ++itr1) {
    for (auto itr = itr1; itr != points.end(); ++itr) {
      int p1 = itr1->first + itr->first;
      int p2 = itr1->second + itr->second;
      if (p1 % 2 == 0 && p2 % 2 == 0) {
        if (points.find(make_pair(p1 / 2, p2 / 2)) != points.end()) {
          count++;
        }
      }
    }
  }
  cout << count - points.size();
  return 0;
}
