#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
bool m[N][N];
pair<int, int> mid(pair<int, int> a, pair<int, int> b) {
  if (abs(a.second - b.second) % 2 == 0 && abs(a.first - b.first) % 2 == 0)
    return make_pair((a.first + b.first) / 2, (a.second + b.second) / 2);
  else
    return make_pair(3000, 3000);
}
pair<int, int> p[N];
int n, ans;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    cin >> p[i].second;
    p[i].first += 1000;
    p[i].second += 1000;
    m[p[i].first][p[i].second] = true;
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      ans += m[mid(p[i], p[j]).first][mid(p[i], p[j]).second];
  cout << ans << endl;
  return 0;
}
