#include <bits/stdc++.h>
using namespace ::std;
const long long maxn = 15500;
const long long mod = 1e9 + 7;
const long long inf = 1e9 + 500;
const long long maxm = 1e8 + 250;
long long a[maxn];
long long find_min(long long aa) {
  for (long long i = 2; i * i <= aa + 200; i++) {
    while (aa % (i * i) == 0 && aa != 0) {
      aa /= i;
      aa /= i;
    }
  }
  return aa;
}
long long t[maxn];
bitset<maxm * 2> bi;
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long v;
    cin >> v;
    a[i] = find_min(abs(v)) * ((2 * (v >= 0)) - 1);
  }
  for (long long i = 0; i < n; i++) {
    long long cnt = 0;
    bool sefr = 0;
    for (long long j = i; j < n; j++) {
      if (a[j] == 0) {
        sefr = 1;
      }
      if (!bi[a[j] + maxm]) {
        cnt++;
        bi[a[j] + maxm] = 1;
      }
      if (sefr && cnt > 1) {
        t[cnt - 1]++;
      } else {
        t[cnt]++;
      }
    }
    for (long long j = 0; j < n; j++) {
      bi[a[j] + maxm] = 0;
    }
  }
  for (long long i = 1; i <= n; i++) {
    cout << t[i] << ' ';
  }
}
