#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
#define mem(a, b) memset(a, b, sizeof(a));
bool IsPrime[100010] = {0};
int p[100010];
struct factor{
    int x, cnt;//x为质因子,cnt为其个数 
}fac[100]; 
int pNum;
void FindPrime(){
    pNum = 0;
    IsPrime[1] = 1;
    for(int i = 2; i <= 100000; i++){
        if(!IsPrime[i]){
            p[pNum++] = i;
            for(int j = i * i; j <= 100000; j += i){
                IsPrime[j] = 1;
            }
        }
    }
}
int main(){
    FindPrime();
    int n;
    scanf("%d", &n);

    int a[1010];
    for(int i = 0; i < n; i++){
        scanf("%d", &a[i]);
    }

    for(int i = 0; i < n; i++){
        int t = a[i];
        int sqr = (int)sqrt(1.0 * t);

        int num = 0;
        for(int j = 0; j < pNum && p[j] <= sqr; j++){
            if(t % p[j] == 0){
                fac[num].x = p[j];
                fac[num].cnt = 0;
                while(t % p[j] == 0){
                    t /= p[j];
                    fac[num].cnt++;
                }
                num++;
            }
            if(t == 1) break;
        }
        if(t != 1){
            fac[num].x = t; 
            fac[num++].cnt = 1;
        }
        int ans = 1;
        for(int k = 0; k < num; k++){
          ans = ans * (fac[k].cnt + 1);
        }
        printf("%d\n", ans);
    }
    return 0;
}