#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ans = 0;
  vector<pair<double, double> > points(n);
  vector<vector<bool> > m(2002, vector<bool>(2002, false));
  for (int i = 0; i < n; i++) {
    cin >> points[i].first;
    points[i].first += 1000;
    cin >> points[i].second;
    points[i].second += 1000;
    m[points[i].first][points[i].second] = true;
  }
  for (int i = 0; i < points.size(); i++) {
    for (int j = i + 1; j < points.size(); j++) {
      int x = (points[i].first + points[j].first);
      int y = (points[i].second + points[j].second);
      if (x % 2 == 0 && y % 2 == 0) {
        x = x / 2;
        y = y / 2;
        if (m[x][y]) {
          ans++;
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}
