10
-2 1
2 -2
-1 -2
0 0
2 -1
0 -2
2 2
0 2
-1 -1
1 -2
 40
-8 24
2 -1
1 -18
72 -70
5 -4
-308 436
-19 40
36 -35
-178 265
-1 2
-7 30
-1 0
3 -2
200 -285
17 -16
-35 74
0 -4
-86 106
-1 4
-7 6
0 1
-5 4
-2 3
6 -5
-4 5
181 -262
76 -118
0 0
-7 18
-58 104
-5 6
-6 12
-3 4
1 0
11 -10
-86 130
-3 6
153 -236
-183 270
-33 64
 5
0 -1
0 -2
0 -3
0 -4
0 -5
 10
0 1
-1 -1
1 1
-1 0
1 -1
-2 -1
-2 2
-2 0
0 -2
0 -1
 20
-1 18
-2 5
-5 4
2 -33
9 -18
0 0
11 -22
2 0
-1 2
-4 41
1 6
1 -2
6 -12
0 1
-3 6
3 -6
3 -8
-1 4
2 -5
1 0
 10
2 1
-1 0
-2 -1
-1 1
0 2
2 -2
0 0
-2 -2
0 -2
-2 1
 20
-3 -3
0 4
-3 1
1 1
-1 2
-4 4
3 -1
-3 0
0 2
4 0
2 3
2 4
4 -3
-4 3
-1 1
1 3
-2 4
1 -2
1 -1
3 0
 3
0 0
0 -1
0 1
 10
2 1
-1 1
0 0
-3 1
-2 -3
-1 -2
-1 -1
1 2
3 -2
0 -2
 3
3 3
1 2
1 1
 4
0 0
1 0
2 0
3 0
 9
1 1
1 0
0 1
0 0
-1 0
-1 1
-1 -1
1 -1
0 -1
 7
1 1
-1 -1
1 0
0 1
-1 0
0 -1
0 0

4
 57
 4
 5
 21
 4
 10
 1
 1
 0
 2
 8
 3

#include <bits/stdc++.h>
using namespace std;
struct NumberTheory {
  static const long long mod = 1e9 + 7;
  vector<long long> factorial = {1}, factorialInv = {1};
  inline long long mult(long long a, long long b, long long m = mod) {
    return (a * b) % m;
  }
  inline long long norm(long long x) {
    x %= mod;
    if (x < 0) x += mod;
    return x;
  }
  inline long long div(long long a, long long b) { return mult(a, inv(b)); }
  inline long long sub(long long a, long long b) { return norm(a - b); }
  inline long long add(long long a, long long b) { return (a + b) % mod; }
  long long ncr(long long n, long long r) {
    assert(n >= 0);
    if (r < 0 || n < r) return 0;
    return mult(fac(n), mult(finv(r), finv(n - r)));
  }
  long long npr(long long n, long long r) {
    assert(n >= 0);
    if (r < 0 || n < r) return 0;
    return mult(fac(n), finv(n - r));
  }
  long long finv(long long n) {
    long long last = factorialInv.size() - 1;
    if (last < n) {
      vector<long long> finv_temp(n - last);
      finv_temp[0] = inv(fac(n));
      for (long long i = 1; i < (long long)finv_temp.size(); i++) {
        finv_temp[i] = mult(finv_temp[i - 1], n - i + 1);
      }
      for (long long i = finv_temp.size() - 1; i >= 0; i--) {
        factorialInv.push_back(finv_temp[i]);
      }
    }
    return factorialInv[n];
  }
  long long pow(long long x, long long e, long long m = mod) {
    if (e < 0) {
      x = inv(x);
      e *= -1;
    }
    long long res = 1;
    while (e > 0) {
      if (e & 1) res = mult(res, x, m);
      e = e >> 1;
      x = mult(x, x, m);
    }
    return res;
  }
  inline long long inv(long long x) { return pow(x, mod - 2); }
  long long fac(long long n) {
    while ((long long)factorial.size() <= n) {
      factorial.push_back(
          mult(factorial[factorial.size() - 1], factorial.size()));
    }
    return factorial[n];
  }
};
bool isprime(long long n) {
  for (long long i = sqrt(n); i > 1; i--) {
    if (n % i == 0) return false;
  }
  return true;
}
bool is_int(long double d) {
  if (d == ceil(d)) return true;
  return false;
}
long long fact(long long x) {
  if (x == 0 || x == 1)
    return 1;
  else
    return x * fact(x - 1);
}
long long gcd(long long n, long long m) {
  if (n % m == 0) return m;
  if (n < m) swap(n, m);
  while (m > 0) {
    n = n % m;
    swap(n, m);
  }
  return n;
}
bool isPowerOfTwo(long long n) {
  if (n == 0) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
long long binary_search(long long x, long long low, long long high,
                        long long arr[]) {
  if (low == high)
    return low;
  else {
    long long mid = (low + high) / 2;
    if (arr[mid] == x)
      return mid;
    else if (arr[mid] > x)
      return binary_search(x, low, mid - 1, arr);
    else
      return binary_search(x, mid + 1, high, arr);
  }
  return -1;
}
vector<long long> primev;
void SieveOfEratosthenes(long long n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++)
    if (prime[p]) primev.push_back(p);
}
long long sum_of_digits(long long n) {
  long long res{};
  while (n > 0) {
    res += (n % 10);
    n /= 10;
  }
  return res;
}
void solve() {
  long long n, res = 0;
  cin >> n;
  map<pair<long long, long long>, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    mp[{x, y}]++;
  }
  for (auto it = mp.begin(); it != mp.end(); it++) {
    for (auto it1 = it; it1 != mp.end(); it1++) {
      if (it != it1) {
        long long x1 = it->first.first, x2 = it1->first.first,
                  y1 = it->first.second, y2 = it1->first.second;
        long long x = x1 + x2, y = y1 + y2;
        if (x % 2 == 0 && y % 2 == 0) {
          x /= 2, y /= 2;
          if (mp.find({x, y}) != mp.end()) res++;
        }
      }
    }
  }
  cout << res << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long q = 1;
  while (q--) solve();
}
