#include <bits/stdc++.h>
using namespace std;
bool is_square(long long a, long long b) {
  long long res = a * b;
  if (res < 0) {
    return false;
  }
  long long s = sqrt(res);
  for (int i = -1; i <= 1; i++)
    if ((s + i) * (s + i) == res) return true;
  return false;
}
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  cout << setprecision(20);
  int n;
  cin >> n;
  vector<int> vv(n);
  for (int i = 0; i < n; i++) cin >> vv[i];
  vector<bool> been(n, false);
  vector<int> cmp(n, -1);
  int n_cmp = 0;
  for (int i = 0; i < n; i++) {
    if (!vv[i]) {
      cmp[i] = -1;
      continue;
    }
    if (been[i]) continue;
    queue<int> s;
    s.push(i);
    been[i] = true;
    cmp[i] = n_cmp;
    while (!s.empty()) {
      int v = s.front();
      s.pop();
      for (int j = i + 1; j < n; j++) {
        if (vv[j] && is_square(vv[i], vv[j]) && !been[j]) {
          been[j] = true;
          cmp[j] = n_cmp;
          s.push(j);
        }
      }
    }
    n_cmp++;
  }
  vector<int> ans(n + 1, 0);
  for (int i = 0; i < n; i++) {
    vector<bool> b(n, false);
    int x = 0;
    for (int j = i; j < n; j++) {
      if (cmp[j] != -1 && !b[cmp[j]]) {
        b[cmp[j]] = true;
        x++;
      }
      ans[max(x, 1)]++;
    }
  }
  for (int i = 1; i < n + 1; i++) cout << ans[i] << ' ';
  return 0;
}
