#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5003;
int a[MAXN], ans[MAXN];
int pre[MAXN];
struct Node {
  vector<int> factor;
  bool operator==(const Node& o) const {
    if (factor.size() != o.factor.size()) return false;
    for (int k = 0; k < factor.size(); k++) {
      if (factor[k] != o.factor[k]) return false;
    }
    return true;
  }
} node[MAXN];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int i = 0; i < n; i++) {
    vector<int>& f = node[i].factor;
    f.reserve(10);
    if (a[i] < 0)
      f.push_back(-1);
    else if (a[i] > 0)
      f.push_back(1);
    int ai = abs(a[i]);
    int x = ai;
    if (x != 0) {
      for (int d = 2; d * d <= ai; d++) {
        int cnt = 0;
        while (x % d == 0) cnt++, x /= d;
        if (cnt & 1) f.push_back(d);
      }
      if (x != 1) f.push_back(x);
    }
  }
  for (int i = 0; i < n; i++) {
    pre[i] = -1;
    if (a[i] == 0) continue;
    for (int j = i - 1; j >= 0; j--)
      if (a[j] != 0 && node[j] == node[i]) {
        pre[i] = j;
        break;
      }
  }
  for (int i = 0; i < n; i++) {
    int cnt = 1, pre0 = 1;
    for (int j = i; j < n; j++) {
      if (a[j] != 0 && !pre0 && pre[j] < i) cnt++;
      ans[cnt]++;
      if (pre0 && a[j] != 0) pre0 = 0;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
