#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long ans[n + 1], a[n];
  for (long long i = 0; i <= n; i++) ans[i] = 0;
  string val[n];
  for (long long i = 0; i < n; i++) {
    val[i] = "$";
    long long num;
    cin >> num;
    a[i] = num;
    if (num < 0) val[i] = "%";
    num = abs(num);
    long long lim = sqrt(num);
    for (long long j = 2; j <= lim; j++) {
      long long p = 0;
      while (num % j == 0) {
        p++;
        num /= j;
      }
      if (p % 2) {
        val[i] += to_string(j);
        val[i] += "$";
      }
    }
    if (num > 1) {
      val[i] += to_string(num);
      val[i] += "$";
    }
    if (a[i] == 0) {
      val[i] = "**";
    }
  }
  unordered_map<string, long long> seen;
  long long nxt[n];
  for (long long i = n - 1; i >= 0; i--) {
    nxt[i] = seen[val[i]];
    seen[val[i]] = i;
  }
  for (long long i = 0; i < n; i++) {
    long long cnt = 0;
    for (long long j = i; j >= 0; j--) {
      if ((nxt[j] == 0 || nxt[j] > i) && (a[j] != 0)) cnt++;
      ans[max(cnt, 1ll)]++;
    }
  }
  for (long long i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
}
