#include <bits/stdc++.h>
int main() {
  int n, t, number, i, j, count;
  scanf("%d", &n);
  t = sqrt(n);
  for (i = 2; i <= n; ++i) {
    scanf("%d", &number);
    count = 0;
    for (j = 2; j <= t; ++j) {
      if (number % j == 0) {
        count++;
      }
    }
    printf("%d ", count);
  }
  return 0;
}
