#include <bits/stdc++.h>
using namespace std;
int o, p;
int prm[10050];
int mark[10050];
int pos;
void sieve() {
  for (int i = 3; i * i < 10050; i += 2)
    if (!mark[i])
      for (int j = i * i; j < 10050; j += i + i) mark[j] = 1;
  pos = 1;
  prm[0] = 2;
  for (int i = 3; i < 10050; i += 2)
    if (!mark[i]) prm[pos++] = i;
}
int res[10050];
int pls = 100000000;
bool vis[200000005];
int main() {
  sieve();
  int n;
  scanf("%d", &n);
  int ara[n];
  for (int i = 0; i < n; i++) scanf("%d", &ara[i]);
  for (int i = 0; i < n; i++) {
    int a = abs(ara[i]);
    int mult = ara[i] <= 0 ? -1 : 1;
    for (int j = 0; j < pos && prm[j] * prm[j] <= a; j++) {
      int cnt = 0;
      while (a % prm[j] == 0) {
        a /= prm[j];
        cnt++;
      }
      if (cnt & 1) mult *= prm[j];
    }
    if (a > 1) mult *= a;
    if (ara[i] == 0)
      ;
    else
      ara[i] = mult;
  }
  for (int i = 0; i < n; i++) {
    int ans = 0, zero = 0, one = 0, mone = 0, angaged = 0;
    int f = 0;
    for (int j = i; j < n; j++) {
      if (ara[j] == 0) {
        if (zero == 0) {
          if (f)
            angaged = 1;
          else if (one)
            angaged = 1;
          else if (mone)
            angaged = 1;
          else
            ans++;
        }
        zero = 1;
      } else if (ara[j] == 1) {
        if (one == 0) {
          if (zero == 1 && angaged == 0)
            angaged = 1;
          else
            ans++;
        }
        one = 1;
      } else if (ara[j] == -1) {
        if (mone == 0) {
          if (zero == 1 && angaged == 0)
            angaged = 1;
          else
            ans++;
        }
        mone = 1;
      } else if (vis[ara[j] + pls] == 0) {
        if (zero && angaged == 0)
          angaged = 1;
        else
          ans++;
        vis[ara[j] + pls] = 1;
        f = 1;
      }
      res[ans]++;
    }
    for (int j = i; j < n; j++) vis[ara[j] + pls] = 0;
  }
  for (int i = 1; i <= n; i++) printf("%d ", res[i]);
  return 0;
}
