#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline std::ostream& operator<<(std::ostream& os, const std::pair<T1, T2>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
inline std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
  bool first = true;
  os << "[";
  for (unsigned int i = 0; i < v.size(); i++) {
    if (!first) os << ", ";
    os << v[i];
    first = false;
  }
  return os << "]";
}
template <typename T>
inline std::ostream& operator<<(std::ostream& os, const std::set<T>& v) {
  bool first = true;
  os << "[";
  for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end();
       ++ii) {
    if (!first) os << ", ";
    os << *ii;
    first = false;
  }
  return os << "]";
}
template <typename T1, typename T2>
inline std::ostream& operator<<(std::ostream& os, const std::map<T1, T2>& v) {
  bool first = true;
  os << "[";
  for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end();
       ++ii) {
    if (!first) os << ", ";
    os << *ii;
    first = false;
  }
  return os << "]";
}
template <typename T, typename T2>
void printarray(T a[], T2 sz, T2 beg = 0) {
  for (T2 i = beg; i < sz; i++) cout << a[i] << " ";
  cout << endl;
}
template <typename T1, typename T2, typename T3>
struct triple {
  T1 a;
  T2 b;
  T3 c;
  triple(){};
  triple(T1 _a, T2 _b, T3 _c) : a(_a), b(_b), c(_c) {}
};
template <typename T1, typename T2, typename T3>
bool operator<(const triple<T1, T2, T3>& t1, const triple<T1, T2, T3>& t2) {
  if (t1.a != t2.a)
    return t1.a < t2.a;
  else if (t1.b != t2.b)
    return t1.b < t2.b;
  else
    return t1.c < t2.c;
}
template <typename T1, typename T2, typename T3>
inline std::ostream& operator<<(std::ostream& os, const triple<T1, T2, T3>& t) {
  return os << "(" << t.a << ", " << t.b << ", " << t.c << ")";
}
const int inf = 1e9;
const int MOD = 1e9 + 7;
const int N = 4e6 + 10;
const int INF = 1000111000;
int a, b;
vector<pair<int, int> > arr;
int first[10005], second[109005];
long long ans = 0;
int n;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int(i) = (0); (i) < (n); ++(i)) cin >> first[i] >> second[i];
  for (int(i) = (0); (i) < (n); ++(i)) {
    for (int(j) = (i + 1); (j) < (n); ++(j)) {
      a = first[j] - first[i];
      b = second[j] - second[i];
      if (a < 0 || (a == 0 && b < 0)) {
        a = -a;
        b = -b;
      }
      arr.push_back({a, b});
    }
  }
  sort(arr.begin(), arr.end());
  int i = 0;
  while (i < (int)arr.size()) {
    int j = i;
    while (j < (int)arr.size() && arr[i] == arr[j]) j++;
    long long len = j - i;
    ans += len * (len - 1) / 2;
    i = j;
  }
  cout << ans / 2 << endl;
  return 0;
}
