#include <bits/stdc++.h>
using namespace std;
int gcd(int f, int s) {
  if (s == 0)
    return f;
  else
    return gcd(s, f % s);
}
int const N = 5002;
long long const mod = 1000 * 1000 * 1000 + 7;
int arr[N];
int ans[N];
map<int, int> m;
bool vis[N];
int main() {
  int a;
  scanf("%d", &a);
  for (int i = 0; i < a; i++) {
    int temp;
    scanf("%d", &temp);
    if (temp == 0) continue;
    for (int x = 2; x <= 10000; x++) {
      int c = x * x;
      while (temp % c == 0) temp /= c;
    }
    arr[i] = temp;
  }
  int id = 1;
  m[0] = 0;
  for (int i = 0; i < a; i++) {
    if (m.find(arr[i]) == m.end()) m[arr[i]] = id++;
    arr[i] = m[arr[i]];
  }
  for (int i = 0; i < a; i++) {
    bool number = false, done = false;
    vis[arr[i]] = 1;
    int res = 1;
    if (arr[i] != 0) number = 1;
    for (int x = i; x < a; x++) {
      if (i == x) {
        ans[1]++;
        continue;
      }
      if (arr[x] != 0) number = 1;
      if (vis[arr[x]] == 0) {
        vis[arr[x]] = 1;
        res++;
      }
      if (number && vis[0] && !done) {
        res--;
        done = 1;
      }
      ans[res]++;
    }
    memset(vis, 0, sizeof vis);
  }
  for (int i = 1; i <= a; i++) printf("%d ", ans[i]);
  return 0;
}
