#include <bits/stdc++.h>
using namespace std;
const int N = 1e4;
const int M = 1e9 + 7;
const double eps = 1e-6;
const double PI(acos(-1.0));
int n;
int a[5001];
int c[5001];
bool vis[5001];
map<int, int> mp;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = (1); i <= (n); i++) {
    int x;
    cin >> x;
    if (x) {
      int s = x > 0 ? 1 : -1, k = abs(x);
      x = abs(x);
      for (int j = 2; j * j <= k; j++) {
        if (x % j == 0) {
          int t = 0;
          while (x % j == 0) x /= j, t ^= 1;
          if (t) s *= j;
        }
      }
      a[i] = s * x;
      auto it = mp.lower_bound(a[i]);
      if (it == mp.end() || it->first != a[i]) {
        int sz = ((int)mp.size()) + 1;
        mp.insert(it, make_pair(a[i], sz));
        a[i] = sz;
      } else {
        a[i] = it->second;
      }
    } else {
      a[i] = 0;
    }
  }
  for (int i = (1); i <= (n); i++) {
    int zero = 0;
    int cnt = 0;
    for (int j = i; j >= 1; j--) {
      if (a[j] == 0)
        zero++;
      else if (!vis[a[j]]) {
        cnt++;
        vis[a[j]] = 1;
      }
      if (zero && !cnt)
        c[1]++;
      else
        c[cnt]++;
    }
    for (int j = (1); j <= (i); j++) vis[a[j]] = 0;
  }
  for (int i = (1); i <= (n); i++) cout << c[i] << " ";
}
