#include <bits/stdc++.h>
using namespace std;
long long x[2005];
long long y[2005];
struct l {
  int st;
  int en;
  long long dis;
} line[4000100];
int vis[4000100];
long long cmp(l aa, l bb) { return aa.dis < bb.dis; }
int main() {
  int n;
  while (~scanf("%d", &n)) {
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= n; i++) scanf("%lld%lld", &x[i], &y[i]);
    int cnt = 1;
    for (int i = 1; i <= n; i++) {
      for (int j = i + 1; j <= n; j++) {
        line[cnt].st = i;
        line[cnt].en = j;
        line[cnt++].dis =
            (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]);
      }
    }
    sort(line + 1, line + cnt, cmp);
    vis[1] = 1;
    for (int i = 2; i < cnt; i++) {
      if (line[i].dis == line[i - 1].dis)
        vis[i] = vis[i - 1];
      else
        vis[i] = i;
    }
    int ans = 0;
    for (int i = 1; i < cnt; i++) {
      for (int j = vis[i]; j < cnt; j++) {
        if (line[j].dis > line[i].dis) break;
        if (line[j].st == line[i].en || line[j].en == line[i].st ||
            line[j].st == line[i].st || line[j].en == line[i].en)
          continue;
        int x1 = line[i].st;
        int y1 = line[i].en;
        int x2 = line[j].st;
        int y2 = line[j].en;
        if ((x[x1] - x[y1]) * (y[x2] - y[y2]) ==
            (y[x1] - y[y1]) * (x[x2] - x[y2]))
          ans++;
      }
    }
    printf("%d\n", ans / 4);
  }
}
