#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5005;
int res[MAXN];
bool freq[MAXN];
vector<int> primes;
int reduce(int cur) {
  for (int i = 0; primes[i] * primes[i] <= cur && i < primes.size(); ++i) {
    if (cur % primes[i] == 0 && (cur / primes[i]) % primes[i] == 0)
      return reduce(cur / primes[i] / primes[i]);
  }
  return cur;
}
void cp() {
  primes.push_back(2);
  for (int i = 3; i < 10005; ++i) {
    bool prime = true;
    for (int j = 0; primes[j] * primes[j] <= i; ++j) {
      if (i % primes[j] == 0) prime = false;
    }
    if (prime) primes.push_back(i);
  }
}
int main() {
  cp();
  int N;
  scanf("%d \n", &N);
  vector<int> v(N);
  for (int i = 0; i < N; ++i) {
    scanf("%d ", &v[i]);
    if (v[i] > 0) v[i] = reduce(v[i]);
    if (v[i] < 0) v[i] = -reduce(-v[i]);
  }
  map<int, int> mp;
  int index = 1;
  for (int i = 0; i < N; ++i) {
    if (v[i] == 0) continue;
    if (mp[v[i]] == 0) mp[v[i]] = index++;
    v[i] = mp[v[i]];
  }
  for (int i = 0; i < N; ++i) {
    int cur = 0;
    for (int j = i; j < N; ++j) {
      if (v[j] == 0) {
        if (cur == 0)
          ++res[1];
        else
          ++res[cur];
        continue;
      }
      if (!freq[v[j]]) ++cur;
      ++res[cur];
      freq[v[j]] = true;
    }
    for (int j = 0; j <= N; ++j) freq[j] = false;
  }
  for (int i = 1; i <= N; ++i) printf("%d ", res[i]);
}
