#include <bits/stdc++.h>
using namespace std;
int a[5007];
int g[5007];
int cnt[5007];
int f[5007];
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  map<vector<int>, int> mp;
  int sz = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 0) continue;
    vector<int> v;
    int x = a[i];
    if (x < 0)
      v.push_back(-1), x = -x;
    else
      v.push_back(1);
    for (int j = 2; j * j <= x; j++) {
      if (x % j) continue;
      int cnt = 0;
      while (x % j == 0) {
        x /= j;
        cnt++;
      }
      if (cnt % 2) v.push_back(j);
    }
    if (x > 1) v.push_back(x);
    if (mp.find(v) != mp.end())
      g[i] = mp[v];
    else {
      sz++;
      mp[v] = sz;
      g[i] = sz;
    }
  }
  for (int i = 1; i <= n; i++) {
    int tmp = 0;
    memset(f, 0, sizeof f);
    for (int j = i; j <= n; j++) {
      if (a[j] && f[g[j]] == 0) {
        f[g[j]] = 1;
        tmp++;
      }
      cnt[max(1, tmp)]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << cnt[i] << ' ';
  return 0;
}
