#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > s;
vector<pair<int, int> > a;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a.push_back(make_pair(x, y));
    s.insert(make_pair(x, y));
  }
  int ans = 0;
  for (int i = 0; i < a.size(); i++)
    for (int j = i + 1; j < a.size(); j++) {
      int X = a[i].first + a[j].first;
      int Y = a[i].second + a[j].second;
      if (X % 2 != 0 || Y % 2 != 0) continue;
      X /= 2;
      Y /= 2;
      if (s.find(make_pair(X, Y)) != s.end()) ans++;
    }
  cout << ans << endl;
  return 0;
}
