#include <bits/stdc++.h>
using namespace std;
constexpr int kMagicZero = 1e9;
int Reduce(int num) {
  if (num == 0) {
    return kMagicZero;
  }
  int sign = (num > 0 ? 1 : -1);
  num = abs(num);
  int div = 2;
  while (1LL * div * div <= num) {
    int square = div * div;
    while (num % square == 0) {
      num /= square;
    }
    div += 1;
  }
  return sign * num;
}
vector<int> Normalise(const vector<int> &vec) {
  vector<int> sorted(vec);
  sort(sorted.begin(), sorted.end());
  vector<int> norm{sorted[0]};
  for (const auto &elem : sorted) {
    if (elem != norm.back()) {
      norm.push_back(elem);
    }
  }
  return norm;
}
int GetOrder(const vector<int> &vec, int elem) {
  int pos = -1;
  int power = (1 << 14);
  while (power > 0) {
    auto next_pos = pos + power;
    power >>= 1;
    if (next_pos < (int)vec.size() && vec[next_pos] <= elem) {
      pos = next_pos;
    }
  }
  return pos;
}
int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (auto &elem : vec) {
    cin >> elem;
    elem = Reduce(elem);
  }
  auto norm = Normalise(vec);
  for (auto &elem : vec) {
    if (elem != kMagicZero) {
      elem = GetOrder(norm, elem);
    }
  }
  vector<int> count(n, 0);
  for (int i = 0; i < n; ++i) {
    vector<bool> seen(norm.size(), false);
    int distinct = 0;
    for (int j = i; j < n; ++j) {
      if (vec[j] != kMagicZero && !seen[vec[j]]) {
        seen[vec[j]] = true;
        distinct += 1;
      }
      count[max(distinct, 1) - 1] += 1;
    }
  }
  for (const auto &elem : count) {
    cout << elem << " ";
  }
  return 0;
}
