#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
int main() {
  int n;
  cin >> n;
  set<pair<int, int> > v;
  for (int i = (0); i < (n); ++i) {
    int x, y;
    cin >> x >> y;
    v.insert(make_pair(x, y));
  }
  int ret = 0;
  for (set<pair<int, int> >::iterator i = (v).begin(); i != (v).end(); ++i) {
    set<pair<int, int> >::iterator j = i;
    j++;
    for (; j != v.end(); ++j) {
      if (((v).find(make_pair((*j).first * 2 - (*i).first,
                              (*j).second * 2 - (*i).second)) != (v).end())) {
        ret++;
      }
    }
  }
  cout << ret;
}
