#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 5000 + 10;
map<int, int> num;
bool exist[MAX_N];
int dp[MAX_N];
int a[MAX_N];
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  int cnt = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 2; j * j <= abs(a[i]); j++)
      while (!(a[i] % (j * j))) a[i] /= j * j;
    if (a[i] && !num[a[i]]) num[a[i]] = cnt++;
    a[i] = num[a[i]];
  }
  for (int i = 0; i < n; i++) {
    memset(exist, false, sizeof exist), cnt = 0;
    for (int j = i; j < n; j++) {
      cnt += (a[j] && !exist[a[j]]);
      exist[a[j]] = true, dp[max(cnt, 1)]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << dp[i] << ' ';
  return 0;
}
