#include <bits/stdc++.h>
using namespace std;
int z[10000], ans[10000], size[10000], v[10000];
long long a[10004];
int vis[10004];
int root(int i) {
  while (z[i] != i) i = z[i];
  return i;
}
void union1(int i, int j) {
  i = root(i);
  j = root(j);
  if (i != j) {
    if (size[i] > size[j]) {
      size[i] += size[j];
      z[j] = i;
    } else {
      size[j] += size[i];
      z[i] = j;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    size[i] = 1;
    z[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (a[i] == 0 || a[j] == 0) continue;
      long long w = a[i] * a[j];
      if (w >= 0) {
        double w1 = sqrt(w);
        long long w2 = w1;
        w2 = w2 * w2;
        if (w2 == w) union1(i, j);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] != 0) v[i] = root(i);
  }
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    for (int j = 1; j <= n; j++) vis[j] = 0;
    if (a[i] == 0) {
      cnt = 0;
      ans[1]++;
    } else {
      vis[v[i]] = 1;
      cnt = 1;
      ans[cnt]++;
    }
    for (int j = i + 1; j <= n; j++) {
      if (a[j] != 0) {
        if (vis[v[j]] == 0) {
          vis[v[j]] = 1;
          cnt++;
        }
      }
      if (cnt != 0)
        ans[cnt]++;
      else
        ans[1]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << '\n';
}
