#include <bits/stdc++.h>
using namespace std;
void amax(long long &a, long long b) { a = max(a, b); }
void amin(long long &a, long long b) { a = min(a, b); }
const long long INF = 5e18;
const long double pi = 3.14159265358979323846;
struct number_theory {
  vector<long long> primelist;
  bool __primes_generated__ = 0;
  bool prime[100000001];
  void init(long long n = 600001) { genprimes(n); }
  long long gcd(long long first, long long second) {
    if (first == 0) return second;
    if (second == 0) return first;
    return gcd(second, first % second);
  }
  bool isprime(long long n) {
    if (n <= 1) return false;
    if (n <= 3) return true;
    if (n % 2 == 0 || n % 3 == 0) return false;
    for (long long i = 5; i * i <= n; i += 6)
      if (n % i == 0 || n % (i + 2) == 0) return false;
    return true;
  }
  void sieve(long long n) {
    for (long long i = 0; i <= n; i++) prime[i] = 1;
    for (long long p = 2; p * p <= n; p++) {
      if (prime[p] == true) {
        for (long long i = p * p; i <= n; i += p) prime[i] = false;
      }
    }
    prime[1] = prime[0] = 0;
  }
  void genprimes(long long n) {
    __primes_generated__ = 1;
    sieve(n + 1);
    for (long long i = 2; i <= n; i++)
      if (prime[i]) primelist.push_back(i);
  }
  vector<pair<long long, long long> > factors(long long n) {
    if (!__primes_generated__) {
      cerr << "Call init you dope" << '\n';
      exit(1);
    }
    vector<pair<long long, long long> > facs;
    for (long long i = 0;
         primelist[i] * primelist[i] <= n && i < primelist.size(); i++) {
      if (n % primelist[i] == 0) {
        while (n % primelist[i] == 0) {
          n /= primelist[i];
          if (facs.size() == 0 || facs.back().first != primelist[i])
            facs.push_back(make_pair(primelist[i], 1));
          else
            facs.back().second++;
        }
      }
    }
    if (n > 1) facs.push_back(make_pair(n, 1));
    sort(facs.begin(), facs.end());
    return facs;
  }
  vector<pair<long long, long long> > factorssq(long long n) {
    vector<pair<long long, long long> > facs;
    for (long long i = 2; i * i <= n; i++) {
      long long cnt = 0;
      while (n % i == 0) {
        cnt++;
        n = n / i;
      }
      if (cnt) facs.push_back(make_pair(i, cnt));
    }
    if (n > 1) facs.push_back(make_pair(n, 1));
    return facs;
  }
  vector<long long> getdivs(long long n) {
    vector<long long> divs;
    for (long long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        divs.push_back(i);
        divs.push_back(n / i);
      }
    }
    {
      sort(divs.begin(), divs.end());
      divs.erase(unique(divs.begin(), divs.end()), divs.end());
    };
    return divs;
  }
};
number_theory nt;
long long getline(long long k) {
  if (k == 0) return k;
  long long curr = 1;
  vector<pair<long long, long long> > f = nt.factorssq(abs(k));
  for (pair<long long, long long> fac : f) {
    if (fac.second % 2) curr *= fac.first;
  }
  if (k < 0) return -curr;
  return curr;
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  map<long long, long long> m;
  long long ind = 1;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    a[i] = getline(a[i]);
    if (a[i] && !m[a[i]]) m[a[i]] = ind++;
    a[i] = m[a[i]];
  }
  long long freq[n + 1], ans[n + 1];
  memset(ans, 0, sizeof(ans));
  for (long long i = 0; i < n; i++) {
    memset(freq, 0, sizeof(freq));
    long long cntz = 0, dis = 0;
    for (long long j = i; j < n; j++) {
      freq[a[j]]++;
      if (freq[a[j]] == 1 && a[j]) dis++;
      ans[max(dis, 1LL)]++;
    }
  }
  for (long long i = 1; i < n + 1; i++) cout << ans[i] << " ";
  cout << '\n';
}
signed main() {
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}
