#include <bits/stdc++.h>
using namespace std;
bool vec[2001][2001];
pair<int, int> func(pair<int, int> &p1, pair<int, int> p2) {
  if ((p1.first + p2.first) % 2 == 0 && (p1.second + p2.second) % 2 == 0)
    return make_pair((p1.first + p2.first) / 2 + 1000,
                     (p1.second + p2.second) / 2 + 1000);
  return make_pair(-1, -1);
}
bool check(pair<double, double> &p1, pair<int, int> &p2) {
  return p1.first == (double)p2.first && p1.second == (double)p2.second;
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > v(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> v[i].first >> v[i].second;
    vec[v[i].first + 1000][v[i].second + 1000] = true;
  }
  int count = 0;
  pair<int, int> p;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      p = func(v[i], v[j]);
      if (p.first != -1 && p.second != -1 && vec[p.first][p.second]) {
        count++;
      }
    }
  }
  cout << count;
  return 0;
}
