#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
  x = 0;
  bool f = false;
  char ch = getchar();
  while (!isdigit(ch)) {
    f |= ch == '-', ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + (ch ^ 48);
    ch = getchar();
  }
  x = f ? -x : x;
  return;
}
template <typename T>
inline void write(T x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 ^ 48);
  return;
}
const int N = 1e5 + 5;
int n, m, a[N], prime[N], top;
bool isprime[N];
void GetPrimes(int V) {
  isprime[1] = true;
  for (int i = 2; i <= V; i++) {
    if (!isprime[i]) prime[++top] = i;
    for (int j = 1; prime[j] * i <= V; j++) {
      isprime[i * prime[j]] = true;
      if (i % prime[j] == 0) break;
    }
  }
  return;
}
namespace Map {
const int Size = 1e6 + 5;
int head[Size], nex[Size], val[Size], idx;
int to[Size], sta[Size], top;
const int mod = 999983;
inline void Insert(int x, int v) {
  int key = 1ll * (x % mod * 131) % mod;
  key += (key <= 0 ? mod : 0);
  for (int i = head[key]; i; i = nex[i])
    if (to[i] == x) return val[i] += v, void();
  nex[++idx] = head[key], to[idx] = x, val[idx] = v, head[key] = idx;
  sta[++top] = key;
  return;
}
inline int Count(int x) {
  int key = 1ll * (x % mod * 131) % mod;
  key += (key <= 0 ? mod : 0);
  for (int i = head[key]; i; i = nex[i])
    if (to[i] == x) return val[i];
  return 0;
}
inline void Init() {
  idx = 0;
  for (int i = 1; i <= top; i++) head[sta[i]] = 0;
  top = 0;
  return;
}
}  // namespace Map
int num[N];
signed main() {
  read(n);
  GetPrimes(1e5);
  for (int i = 1; i <= n; i++) {
    read(a[i]);
    int tmp = 1;
    int flag = (a[i] < 0);
    a[i] = (a[i] < 0 ? -a[i] : a[i]);
    for (int j = 1; prime[j] * prime[j] <= a[i]; j++) {
      if (a[i] % prime[j] == 0) {
        int res = 0;
        while (a[i] % prime[j] == 0) {
          a[i] /= prime[j];
          res++;
        }
        if (res & 1) tmp *= prime[j];
      }
    }
    tmp *= a[i];
    a[i] = tmp * (flag ? -1 : 1);
  }
  for (int i = 1; i <= n; i++) {
    Map::Init();
    int tot = 0;
    bool flag = false;
    for (int j = i; j <= n; j++) {
      if (a[j] == 0) {
        num[max(1, tot)]++;
        continue;
      }
      if (!Map::Count(a[j]))
        Map::Insert(a[j], 1), num[++tot]++;
      else
        num[tot]++;
    }
  }
  for (int i = 1; i <= n; i++) write(num[i]), putchar(' ');
  return 0;
}
