#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18L + 5;
struct Data {
  long long int p;
  long long int h;
};
void ini() {}
bool comp(Data &a, Data &b) { return a.p < b.p; }
long long int gcd(long long int a, long long int b) {
  while (a != 0) {
    long long int temp = a;
    a = b % a;
    b = temp;
  }
  return b;
}
void solve() {
  long long int n;
  set<pair<long long int, long long int> > s;
  cin >> n;
  long long int x[n], y[n];
  for (long long int i = (long long int)(0); i < (long long int)(n); i++) {
    cin >> x[i] >> y[i];
    s.insert({x[i], y[i]});
  }
  long long int x1, y1, ans = 0;
  for (long long int i = (long long int)(0); i < (long long int)(n - 1); i++) {
    for (long long int j = (long long int)(i + 1); j < (long long int)(n);
         j++) {
      if ((x[i] + x[j]) % 2 == 0 && (y[i] + y[j]) % 2 == 0) {
        x1 = (x[i] + x[j]) / 2;
        y1 = (y[i] + y[j]) / 2;
        if (s.find({x1, y1}) != s.end()) {
          ans++;
        }
      }
    }
  }
  cout << ans;
  cout << "\n";
  ;
}
int main() {
  ini();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
}
