#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
};
bool cmp(point a, point b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
point A[3000];
bool binSearch(int iLow, int iHigh, point v) {
  if (iLow == iHigh) {
    if ((A[iLow].x == v.x) && (A[iLow].y == v.y)) return 1;
    return 0;
  }
  if ((iLow + 1) == iHigh) {
    if ((A[iLow].x == v.x) && (A[iLow].y == v.y)) return 1;
    if ((A[iHigh].x == v.x) && (A[iHigh].y == v.y)) return 1;
    return 0;
  }
  int iMid = (iLow + iHigh) / 2;
  if (A[iMid].x > v.x) return binSearch(iLow, iMid - 1, v);
  if (A[iMid].x < v.x) return binSearch(iMid + 1, iHigh, v);
  if (A[iMid].y > v.y) return binSearch(iLow, iMid - 1, v);
  if (A[iMid].y < v.y) return binSearch(iMid + 1, iHigh, v);
  return 1;
}
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i].x >> A[i].y;
  sort(A, A + N, cmp);
  int ans = 0;
  point mid;
  for (int i = 0; i < N; i++) {
    for (int j = (i + 1); j < N; j++) {
      mid.x = (A[i].x + A[j].x);
      mid.y = (A[i].y + A[j].y);
      if (mid.x % 2) continue;
      if (mid.y % 2) continue;
      mid.x /= 2;
      mid.y /= 2;
      ans += binSearch(0, N - 1, mid);
    }
  }
  cout << ans << endl;
}
