int fi(int a,int j);
void main()
{
	int a,n;
	scanf("%d",&n);
	while(n--){
		scanf("%d",&a);
		printf("%d\n",fi(a,2));
	}
}
int fi(int a,int k)
{
	int i,b=1;
	if(a==1)
		return 0;
	for(i=k;i*i<=a;i++)
		if(a%i==0)
			b=b+fi(a/i,i);
	return b;
}


int yinshu(int be,int by)//???????
{
    int i,sum=0;
    for(i=by;i*i<=be;i++)
    {
                       if(be%i==0)
                       {
                                  sum=sum+1+yinshu(be/i,i);
                       }//be?i?????????????????be/i
    }
    return sum;
}
int main()
{
    int n;
    cin>>n;//??
    while(n--)//???
    {
                    int num,sign;//sign??????
                    cin>>num;
                    for(int j=num;j>1;j--)
                    {
                            if(num%j==0)
                            sign=j;
                    }//??????
                    cout<<yinshu(num,sign)+1<<endl;//????
    }
    return 0;
}


int times;
int move(int a,int num)//a??????
{int i;
	if(num==1)
		times++;
   for(i=2;i<=num;i++)
	   if(num%i==0&&i>=a)
		   move(i,num/i);
   return times;
}
int main()
{
int n,i;
cin>>n;
int a[n];
for(i=0;i<n;i++)
	cin>>a[i];
int b[n];//??????
for(i=0;i<n;i++)
	{times=0;
	b[i]=move(1,a[i]);}
for(i=0;i<n;i++)
	cout<<b[i]<<endl;
return 0;
}


int f(int a,int min)
{
if(a < min)
{
return 0;
}
int result = 1;
for(int i = min;i<a;i++)
{
if(a % i == 0)
{
result += f(a/i,i);
}
}
return result;
}

main()
{
      int n;
      scanf("%d",&n);
      int i;
      int a;
      int b;
      for(i=0;i<n;i++)
      {
            scanf("%d",&a);
            int min=2;
            b=f(a,2);
            printf("%d",b);
            printf("\n");
      }
      }


int m[100],i;
void sb(int,int);
int main()
{
	int n,a[100];
 scanf("%d",&n);
 for(i=0;i<n;i++)
	 scanf("%d",&a[i]);
 for(i=0;i<n;i++)
 {
	 sb(a[i],2);
  printf("%d\n",m[i]+1);
 }
  return 0;
}
void sb(int c,int d)
{
	 int v;
	 for(v=d;v<=sqrt(c);v++)
	 {
		 if(c%v==0)
		 {
			 m[i]++;
             sb(c/v,v);}}
}


int num=0;
void f(int k,int n)
{
    int i,flag=0;
    for(i=k;i<=n;i++)
    {
        if(n%i==0)
        {
            f(i,n/i);
            flag=1;
        }
    }
    if((flag==0&&k<=n)||n==1)
    num++;
}
int main()
{
    int i,n,m;
    cin>>m;
    for(i=1;i<=m;i++)
    {
       cin>> n;
       f(2,n);
       cout<<num<<endl;
       num=0;
    }

    return 0;
}


int n,t,cnt;
void f(int left,int last){
	if(left<last) {if(left==1) cnt++;return;}
	for (int i=last;i<=left;i++) if(left%i==0) f(left/i,i);
}
int main(){
	scanf("%d",&t);
	while (t--){
		scanf("%d",&n);
		cnt=0;f(n,2);
		printf("%d\n",cnt);
	}
	return 0;
}


int make(int x,int t)
{
	int ans=0,i;
	if (x==1) return 1;
	for (i=t;i<=x;i++)
	if (x%i==0) ans+=make(x/i,i);
	return ans;
}
int main()
{
	int i,k,j,p,n,t,m,x;
	scanf("%d",&t);
	for (p=1;p<=t;p++)
	{
		scanf("%d",&n);
		x=make(n,2);
		printf("%d\n",x);
	}
}


int sum;
void f(int x,int min)
{ int p;
  if (x==1) sum++;
     else for (p=min;p<=x;p++)
               if (x%p==0) f(x/p,p);
     }
int main()
{ int n,i,j,k;
  cin>>n;
  for (i=1;i<=n;i++)
      {sum=0;
       cin>>k;
       for (j=2;j<=k;j++)
            if (k%j==0) f(k/j,j);
       cout<<sum<<endl;
                    }
 return 0;
    }


int sum=0;
int f(int a,int b)
{
     for(int i=a;i>1;i--)
     {
     if(a%i!=0)
     {continue;}
     else
     {
     if(i>b)
     {continue;}
     else
     {
     int q;
     q=a/i;
     if(q==1)
     {sum++;}
     else {f(q,i);}
     }
     }
     }
     return sum;
}

int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
    int num;
    cin>>num;
    int c;
    c=f(num,num);
    cout<<c<<endl;
    sum=0;
    }
    return 0;
}


int fenjie(int out[16],int a,int n,int m,int sheng,int b[2])
//n??out?????????m?????????????2?????????,sheng???????
{
	int i;
	for(i=m;i<=a/2;i++)
	{
		if(sheng%i==0)
		{
			out[n]=i;
			int qiu=1,k;
			for(k=0;k<=n;k++)qiu=out[k]*qiu;
			//cout<<i<<" "<<qiu<<" "<<n<<endl;
			if(qiu==a){b[0]++;break;}
			if(qiu>a)break;
			else fenjie(out,a,n+1,i,sheng/i,b);

		}

	}
	return 0;
}
int main()
{
	int hang=0;
	cin>>hang;
	while(hang>0)
	{
		int a;
		int b[2]={0};
		cin>>a;
		int out[16]={0};
		fenjie(out,a,0,2,a,b);
		cout<<b[0]+1<<endl;
		hang--;
	}
	return 0;
}


int elm[100]={0};
int counts=0,num=0;
void Try(int b,int s)
{
	int j;
	for(j=2;j<=num;j++)
	{
		if(j>=elm[s-1])
		{
			if(b%j==0)
			{
				elm[s]=j;
				if(b/j==1)
					counts++;
				else if(b/j<j)
					continue;
				else
					Try(b/j,s+1);
			}
		}
	}
}
int main()
{
	int n,i;
	cin>>n;
	for(i=0;i<n;i++)
	{
		counts=0;
		cin>>num;
		Try(num,1);
		cout<<counts<<endl;
	}
	return 0;
}


int s[100];
int f(int a,int min){
if(a < min){
return 0;
}
int result = 1;
for(int i = min;i<a;i++){
if(a % i == 0){
result += f(a/i,i);
}
}
return result;
}

main()
{int m,mm;
scanf("%d",&m);
for(int i=0;i<m;i++){
        scanf("%d",&mm);
/*for(int i=0;i<m+1;i++){s[i]=0;printf("%d",s[i]);}*/
 printf("%d\n",f(mm,2));}
 }


int fenjie(int n,int min)
{
int x=0,i;
if(n==1)
return 1;
else
{
	for(i=min;i<=n;i++)
	{
		if(n%i==0)
		x=x+fenjie(n/i,i);}
}
return x;}
main()
{int shu;
	int number,count=1;
	scanf("%d",&number);
	while(count<number)
	{
		scanf("%d",&shu);
		printf("%d\n",fenjie(shu,2));
	count++;	}
	scanf("%d",&shu);
	printf("%d",fenjie(shu,2));

}


int calculate(int a, int num) { // a is the max num
	int sum = 0;
	if(num == 1) return 1;
	for(int i = num; i >= 2; i--) {
		if(num % i == 0 && i <= a) {
			sum += calculate(i, num / i);
		}
	}
	return sum;
}

int main () {
	int n;
	cin >> n;
	int num = 0;
	for(int i = 0; i < n; i++) { // input part
		cin >> num;
		cout << calculate(num, num) << endl;
	}
	return 0;
}


int sum = 0;
void fenjie(int t,int n)
{
	int i = 0;
	if(n == 1)
	    sum++;
    for(i = t; i <= n; i++)
	{
		if(n % i == 0)
		{
			fenjie(i, n / i);
		}
	}
}
int main()
{
	int n = 0, k = 0;
	cin >> n;
	while(n > 0)
	{
		 cin >> k;
         sum = 0;
		 fenjie(2,k);
		 n--;
		 cout << sum <<endl;
	}
	return 0;
}


int ans;

void dfs(int, int);

int main()
{
	int n, num;
	cin >> n;
	while (n--) {
		cin >> num;
		ans = 0;
		dfs(num, 2);
		cout << ans <<endl;
	}
	return 0;
}

void dfs(int x, int f)
{
	if (x == 1) {
		++ans;
		return ;
	}
	for (int i = f; i <= x; ++i)
		if (x % i == 0)
			dfs(x / i, i);
	return ;
}


int num;
void divide(int n,int n2)
{
	int i,m1;
	m1=(int)sqrt((double)n);
	for(i=n2;i<=m1;i++)
	{if(n%i==0)
	{num++;divide(n/i,i);}//?????????????????????????????
	}
}
int main()
{
	int n,i,m;
	cin>>n;
	for(i=0;i<n;i++)
	{
		num=1;
		cin>>m;

		divide(m,2);
		cout<<num<<endl;
	}
	return 0;
}


int main()
{
	int f(int a,int b);
	int n,a;

	cin>>n;
	while(n>0)
	{
		cin>>a;
		cout<<f(a,2)<<endl;
	n--;
	}
return 0;
}

int f(int a,int b)
{
	int i;
	int s=1;

	if(a<b)
		return 0;
	for(i=b;i<a;i++)
	{
		if(a%i==0)
			s=s+f(a/i,i);
	}
		return s;
}


int s=0;

void find(int min,int dev)
{
    int i;
    for(i=min;i<=sqrt((float)dev);i++)
       if(dev%i==0)
          {
                 s++;
                 find(i,dev/i);
          }
}

int main()
{
    int n,i,m,j;
	scanf("%d",&m);
	for(j=1;j<=m;j++){
    scanf("%d",&n);
    for(i=2;i<=sqrt((float)n);i++)
        if(n%i==0)
          {
                 s++;
                 find(i,n/i);
          }
		printf("%d\n",s+1);s=0;}
    //getchar();
    //getchar();
	return 0;
}


int fun(int m,int n)
{
    int i,sum=1;
    if(n==1)
    {
        for(i=2;i*i<=m;i++)
        {
            if(m%i==0)
            sum+=fun(m/i,i);
        }
    }
    else
    for(i=n;i*i<=m;i++)
    {
        if(m%i==0)
        {
            sum+=fun(m/i,i);
        }
    }
    return sum;
}
int main()
{
    int n,i,b;
    int a[1000];
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>b;
        a[i]=fun(b,1);
    }
    for(i=0;i<n;i++)
    cout<<a[i]<<endl;
}


int t;
int f(int a,int b){
	int i;
    for(i=a;i*i<=b;i++){
        if(b%i==0){
            t++;
            f(i,b/i);
        }
    }
return t;
}
void main()
{
    int n,i,result[1000],a[1000];
    scanf("%d",&n);

    for(i=0;i<n;i++){
		t=1;
        scanf("%d",&a[i]);
        result[i]=f(2,a[i]);

    }
 for(i=0;i<n;i++)
	printf("%d\n",result[i]);
}


int f(int s,int num) //s?????num?????
{
     if(s==num) return 1;
     if(s<num)
      for(int i=s;i<=num;i++)
      {
        if(num%i==0)
        {
          if(i<num)   return f(i,num/i)+f(i+1,num);
          if(i==num)  return 1;
        }
      }
     if(s>num)  return 0;
}
int main()
{
    int n,i,num;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>num;
        cout<<f(2,num)<<endl;
    }
    return 0;
}


int T,n;

int calc(int n, int min){
	if(n==1)
		return 1;
	if(n<=min)
		return 0;
	int re=0;
	for(int i=min+1; i<=n; i++)
		if(n%i==0){
			//printf("calc %d,%d += calc %d,%d\n",n,min,n/i,i);
			re+=calc(n/i, i-1);
		}
	if(!re)re=1;
	//printf("calc %d,%d=%d\n", n, min, re);
	return re;
}

int main(){

	scanf("%d",&T);
	while(T--){
		scanf("%d",&n);
		printf("%d\n", calc(n,1));
	}
	return 0;
}


int f(int a, int b)
{
    int k = 0;
    if (a >= 2 * b)
    {
        for (int i = b; i <= a / b; i++)
        {
            if (a % i == 0 && a/i >= i)
            {
                k += f(a/i, i) + 1;
            }
        }
    }
    else
    {
        k = 0;
    }
    return k;
}

int main()
{
    int n, a, t;
    cin >> n;
    while (n--)
    {
        cin >> a;
        t = f(a, 2) + 1;
        cout << t << endl;
    }
    return 0;
}


int t=0;
int mini(int k,int i)//a?ˆ ˝o?÷÷?÷?®?¨?›?è™«Ûk?Û⁄i
{
	if(k==1)t=t+1;
	for(;i<=k;i++)
	{
		if(k%i==0)mini(k/i,i);
	}
	return 0;
}

int main()
{
	int N,n;
	scanf("%d",&N);
	for(n=0;n<=N-1;n++)
	{
		int M;
		scanf("%d",&M);
		mini(M,2);
		printf("%d\n",t);
		t=0;
	}
}


int total=0;
int divide(int k,int number)
{
    if(number==1){total++;return 0;}
    int i;
    for(i=k;i<=number;i++)
    {
       if(number%i==0)
       divide(i,number/i);
    }return 0;
}
int main()
{
    int i,n;
    cin>>n;
    int num[n];
    for(i=0;i<n;i++)
      cin>>num[i];
    for(i=0;i<n;i++)
    {total=0;
     divide(2,num[i]);
     cout<<total<<endl;
    }
    cin>>n;
    return 0;
}


    int factor(int n,int min){
    int result=1,i;
    if(n<min){
              return 0;}
    for(i=min;i<n;i++){
                       if(n%i==0){
                                  result=result+factor(n/i,i);
                                  }
                                  }
                       return result;
                       }
    int main(){
        int n,a[100000],b[100000];
        scanf("%d",&n);
        for(int j=0;j<=n-1;j++){
                scanf("%d",&a[j]);
                b[j]=factor(a[j],2);
                printf("%d\n",b[j]);
                }
                return 0;}


int fact(int a, int min)
{
	if (a<min)
		return 0;
	int way = 1;
	for (int i = min; i <= sqrt((double)a); i++)
	if (a%i == 0)
		way += fact(a / i, i);
	return way;
}

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i<n; i++)
	{
		int c;
		cin >> c;
		cout << fact(c, 2) << endl;
	}
	return 0;
}


int t;
void tot(int,int);
int main()
{

	int n,a[100],i;
	cin>>n;
	for(i=1;i<=n;i++)
	cin>>a[i];
	for(i=1;i<=n;i++) {
		t = 0;
		tot(a[i],2);
		cout<<t<<endl;
	}
	return 0;
}

void tot(int x, int min)
{	int k;
	if(x==1) {
		++t;
		return;
	}
	for(k=min;k<=x;k++)
		if(x%k==0)
		{
			tot(x/k, k);
		}
}


int num=0;
int solution(int a,int b){
	for(int i = b; i <= a; i++){
		if(a%i == 0){
			a=a/i;
			if(a == 1) num++;
			else num=solution(a,i);
			a=a*i;
		    }
		}
		return num;
	}
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a;
		cin>>a;
		num=0;
		cout<<solution(a,2)<<endl;
		}

		return 0;
	}


int sum=0;
void recur(int N,int i)
{
    if(N==1) sum++;
    while(i<=N)
    {
        if(N%i==0)
			recur(N/i,i);
        i++;
    }
    return ;
}
int main()
{
    int t=0;
    cin>>t;
    for(int k = 0; k < t; k++)
    {
        int n=0;
        cin>>n;
        int i=2,res=1;
        for(int i =2; i <=n/2;i++)
        {
            if(n%i==0)
            {
                sum=0;
                recur(n/i,i);
                res+=sum;
            }
        }
        cout<<res<<endl;
    }
    return 0;
}


int ans = 0;
void work(int p,int k)
{
	if(p == 1){
		ans ++;
		return ;
	}
	for(int i =k;i <= p;i ++){
		if(p % i == 0){
			work(p / i,i);
		}
	}
}
int main()
{
	int n;
	scanf("%d",&n);
	while(n--){
		ans = 0;
		int t;
		scanf("%d",&t);
		work(t,2);
		//ans = work(t);
		printf("%d\n",ans);
	}
	return 0;
}


/*
 * main.cpp
 *
 *  Created on: 2012-11-12
 *      Author: ??
 * 1090 ????

 */

int sum;
int a[100];
void search(int t,int k)
{
	int i;
	if (k==1) sum++;
	else
	for (i=a[t-1];i<=k;i++)
		if (k%i==0) {a[t]=i;search(t+1,k/i);}
}

int main()
{
	int n,i,k;
	cin>>n;
	for (i=1;i<=n;i++)
	{
		cin>>k;
		sum=0;
		a[0]=2;
		search(1,k);
		cout<<sum<<endl;
	}
	return 0;
}


int f(int a,int j);
int main()
{
    int n,a,s,i;
    cin>>n;
    for(i=0;i<n;i++)
    {
                    cin>>a;
                    s=f(a,2)+1;
                    cout<<s<<endl;}

    return 0;
}
int f(int a,int j)
{  int i,tem;
    //if(j>sqrt(a))return 0;
    int count = 0;
   for(i=j;i<=sqrt(a);i++)
   {
       if(a%i==0)
           {
                  j=i;
                  //tem=f(a/i,j);
                  //count=(tem+1)+count;
                  //cout<<"i="<<i<<","<<"f="<<tem<<","<<count<<endl;
                  //cout<<"count="<<count<<endl;
                  //count=(f(a/i,j)+1)+count;
                  //count=count+(f(a/i,j)+1);
                  if(a/i < j) count+=1;
                  else count+=(f(a/i,j)+1);
                  //cout<<"i="<<i<<","<<count<<endl;
           }
   }
   return count;
}


int n, a, cnt = 0, num;
int decompose(int x, int y)
{
    int i, xnum = 1;
    if(x == 1)
        return 0;
    if(x == 2)
        return 1;
    for(i = y; i <= (int)sqrt(x); i++)
        if(x % i == 0)
            xnum += decompose(x / i, i);
    return xnum;
}
int main()
{
    cin >> n;
    while(cnt < n)
    {
        cin >> a;
        num = decompose(a, 2);
        cout << num << endl;
        cnt++;
    }
    return 0;
}


int disassamble(int, int);
int main()
{
    int n;
    int i = 1;
    int a, result;
    cin >> n;
    while(i <= n)
    {
            i++;
            cin >> a;
            result = disassamble(a, 2);
            cout << result << endl;
    }

    return 0;
}
int disassamble(int a, int y)
{
    int i, count = 1;
    if(a == 1)
         return 0;
    if(a == 2)
         return 1;
    for(i = y; i * i <= a; i++)
    {
          if(a % i == 0)
          {
                count = disassamble(a / i, i) + count;
           }
    }
    return count;
}


int multiply(int a,int b)
{
	int i=0,n=0,sum=1;
	if(a<b)
		return 0;
	else
	{
		for(i=b;i<=a;i++) //????
		{
			if(a%i==0)
			{
				sum=sum+multiply(a/i,i); //????
			}
		}
		return sum;
	}
}
int main()
{
	int n=0,m=0,i=0,sum=0,num,result[1000];
	cin>>n;
	do    //?????
	{
		cin>>num;
		result[i]=multiply(num,2); //????
		i=i+1;
		m=m+1;
	}while(m<n);
	for(i=0;i<n;i++)//????
	{
		cout<<result[i]<<endl;
	}
	return 0;
}


//????
//2010?12?03?
//1000012753 ???
int deal(int num, int p)
{
	int i, sum = 0;
	if(num == 1)
		return 1;
	for(i = p; i <= num; ++i)
		if(num % i == 0)
			sum += deal(num / i, i);
	return sum;
}
int main()
{
	int n, a;
	cin >> n;
	while(n--)
	{
		cin >> a;
		cout << deal(a, 2) << endl;
	}
	return 0;
}


/*
 * 11.27.cpp
 *
 *  Created on: 2011-11-27
 *      Author: Administrator
 */
int coun;                    // ???????
void depart(int n,int i)
{
   int j;
   if (n==1) coun++ ;
   else for (j=i;j<=n;j++)       //???j?? ??????
	   if (n%j==0) {depart(n/j,j);}
}

int main (){
	int n,j;
	cin>>n;
	int b[n];                   //???????
	for(j=0;j<n;j++)
		cin>>b[j];
	for(j=0;j<n;j++)
		{
		coun=0;               //?????
		depart(b[j],2);
		cout<<coun<<endl;
		}
	return 0;
}


int main()
{
	int i,n;
	int fun(int n,int begin);
	scanf("%d",&i);
	while (i-->0)
	{
		scanf("%d",&n);
		printf("%d\n",fun(n,2));
	}
	return 0;
}
int fun(int n,int begin)
{
	int i,result=1;
	for (i=begin;i<=sqrt(n);i++)
		if (n%i==0)
			result+=fun(n/i,i);
	return result;
}


void TRY(int,int);
int num=1;
int main()
{
	unsigned short int n;
	int INTEGER;
	cin>>n;
	while(n-->0)
	{
		cin>>INTEGER;
		int h=2;
		TRY(h,INTEGER);
		cout<<num<<endl;
		num=1;
	}
}
void TRY(int a,int b)
{
	int i;
	for(i=a;i<=sqrt(b);i++)
	{
		if((b%i==0)&&(b/i!=1))
		{
			num++;
			TRY(i,b/i);
		}
	}
}


int p(int a,int m)
{
    int t=0;
    int i;
    if(a%m!=0)
        return 0;
    if((a%m==0)&&(a/m<m)&&(a!=m))
        return 0;
    if(a==m)
        return 1;
    if((a%m==0)&&(a/m>=m))
        {
            for(i=m;i<=a/m;i++)
            {t=t+p(a/m,i);}
            return t;
        }
}

int main()
{   int n;
    cin>>n;
    int i;
    int x;
    int j;
    int num=0;
    for(i=0;i<n;i++)
   {
          cin>>x;
          for(j=2;j<=x;j++)
          {
              num=num+p(x,j);
          }
          cout<<num<<endl;
          num=0;
   }

    return 0;
}


int f(int a,int b)
{
    int c,s=0,i;
    c=(int)sqrt(a);
    for(i=b;i<=c;i++)
    {
     if(a%i==0)
     s=s+f(a/i,i);
    }
    return s+1;
}
main()
{
      int n,i;
      scanf("%d",&n);
      int num[1000];
      for(i=0;i<n;i++)
      {
        scanf("%d",&num[i]);
        printf("%d\n",f(num[i],2));
      }
      }


int begin=2;
int main()
{
	int f(int);
	int n=0,x=0,i=0;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>x;
		cout<<f(x)+1<<endl;
	}
	return 0;
}
int f(int x)
{
	int i=0;
	int left=0;
	int num=0;
	for(i=begin;i<=sqrt(x);i++)
	{
		if(x%i==0)
		{
			num++;
			left=x/i;
			begin=i;
			num+=f(left);
		}
	}
	//if(num!=0)
	    begin=2;
	    return num;
	//else
		//return 0;
}


int fenjie(int x,int y){//x????? y??????????
	int i,s=0;//s??????
	if(x==y)return 1;
	for(i=y;i<x;i++)
		if(x%i==0)s+=fenjie(x/i,i);
	if(i==x)s++;
	return s;
}
int main(){
	int n,i;//n???????
	cin>>n;
	for(;n>0;n--){
		cin>>i;
		cout<<fenjie(i,2)<<endl;
	}
	return 0;
}


int factoring(int a,int b)
{
    int i,kind=0;
	if(a==1)
	{
	    kind=1;
	}

	else
	{
	    for(i=b;i<=a;i++)
		{
		    if(a%i==0)
			{
	            kind=factoring(a/i,i)+kind;
			}
		}
	}
	return kind;
}

int main()
{
	int n,i,j,a[30000]={0},b[30000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		b[i]=factoring(a[i],2);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",b[i]);
	}
	return 0;
}


int factoring(int a,int b)
{
    int i,kind=0;

		//printf("ok  a=%d  b=%d\n",a,b);

	if(a==1)
	{
	    kind=1;
			//printf("kind=1   ok\n");
	}

	else
	{
	    for(i=b;i<=a;i++)
		{
		//	printf("ok\n");

		    if(a%i==0)
			{
	            kind=factoring(a/i,i)+kind;
					//printf("ok  %d\n",kind);
			}
		}
	}

	return kind;
}

int main()
{
   int n,x[40000],i;
   scanf("%d",&n);

   for(i=0;i<n;i++)
   {
      scanf("%d",&x[i]);

   }

   for(i=0;i<n;i++)
   {
       x[i]=factoring(x[i],2);
	   printf("%d\n",x[i]);

   }
   return 0;

}


/*
 * 009.cpp
 *
 *  Created on: 2012-11-27
 *      Author: asus
 */
int varieties = 0;//??????

void divide(int forward, int number)//??divide??
{
 int i;
 if (number == 1)//????
    {
  varieties++;//??
 }
 for (i = forward; i <= number; i++)//forward???????,number?????,?forward?????
    {
  if (number % i == 0)//????
        {
	divide(i, number / i);
 }}}

int main()//???
{
	int n = 0, num = 0;
	cin >> n;//????
	for (int i = 1; i <= n; i ++)
		{cin >> num;
	divide(2, num);//??
	cout << varieties << endl;
		varieties = 0;
		}
	return 0;
}


int num=0;
void asd (int i,int q)
{
	int j;
	for(j=q;j>1;j--)
	{
		if(i%j!=0)
			continue;
		if(i==j)
		{
			num++;
		}
		else
		{
			q=j;
			asd(i/j,q);
		}
	}
}
int main()
{
	int n,o;
	cin>>n;
	for(o=0;o<n;o++)
	{
		num=0;
		int a;
		cin>>a;
		asd(a,a);
		if(num==1)
			cout<<1<<endl;
		else
			cout<<num<<endl;
	}

}


int s=0;
void devide(int,int);
int main()
{
    int n,m;
    cin>>n;
    while(n--)
    {
       cin>>m;
       s=0;
       devide(2,m);
       cout<<s+1<<endl;

    }
    return 0;
}

void devide(int a,int b)
{
    int i;
    for(i=a;i<=sqrt(b);i++)
    {
       if(b%i==0)
       {
         s++;
         devide(i,b/i);

       }

    }

}


int shi(int a)
{
      int b=sqrt(a);
      for(int i=2;i<=b;i++)
      {
           if(a%i==0)return 0;
       }
      return 1;
}
int shu(int m,int k)
{
      int a=1;
      for(int j=k;j<=sqrt(m);j++)
     {
            if(m%j==0&&m/j>=k)
            {
                 a++;
                 if(shi(m/j)==0)a+=shu(m/j,j)-1;
            }
     }
     return a;
}
int main()
{
  int n;
  scanf("%d",&n);
  for(int i=1;i<=n;i++)
 {
     int m,a;
     scanf("%d",&m);
     printf("%d\n",shu(m,2));
 }
return 0;
}


/*???2011?11?28?
 *??????
 *????division.cpp
 *????? - 1090 ????
 */

int main()
{
	int n = 0, integer = 0;							//???????????n?????plate????apple
	int division(int, int);								//????putapple??????????plate?????
													//apple???????????
	cin >> n;										//??????n
	for (int i = 0; i < n; i++)
	{
		cin >> integer;
		cout << division(integer, integer) << endl;			//??????????putapple????????
	}
	return 0;
}

int division(int integer, int limit)
{
	if (limit <= 1)
		return 0;
	switch(integer)
	{
	case 1:
		return 1;
		break;
	default:
	{
		int sum = 0;
		for (int a = 1; a <= integer; a++)
		{
			if (integer%a != 0)
				continue;
			else if (integer/a > limit)
				continue;
			else
				sum += division(a, integer/a);
		}
		return sum;
	}
	break;
	}
}


/*
 *???: ????.cpp
 *??????
 *????: 2012-11-12
 *??: ????????????
 */

int count(int num, int m)
//???????????????????a1????????????
{
    if (num % m != 0) return 0;

    if (num == m) return 1;
    else {
        int counter = 0;
        for (int i = m; i <= num / m; i++){
                counter += count(num / m, i);
        }
        return counter;
    }
}

int main ()
{
    int n,num;
    cin >>n;
    for (int i = 1; i <= n; i++){
        int counter = 0;
        cin >> num;
        for (int i = 2; i <= num; i++)
            counter += count(num,i);//a1???2???m???
        cout << counter << endl;
    }
    return 0;
}


int sum[50];
int i;

int main()
{
	void digui(int x, int y);
	int n;
	int j[50],m[50];

	scanf("%d",&n);

	for(i=0;i<n;i++)
	{
		scanf("%d",&m[i]);
		sum[i]=0;
		for (j[i]=2;j[i]*j[i]<=m[i];j[i]++)
		{
			if(m[i]%j[i]==0)
			{
				sum[i]++;
				digui(j[i],m[i]/j[i]);
			}
		}
		printf("%d\n",sum[i]+1);
	}

	return 0;
}

void digui(int x, int y)
{
	int s;
	for(s=x; s*s<=y; s++)
	{
		if(y%s==0)
		{
			sum[i]++;
			digui(s,y/s);
		}
	}
}


int num=0;
void f(int x,int y)
{
    num++;
    for(int j=y;j*j<=x;j++)
    {
           if(x%j==0)
             f(x/j,j);
    }
}
int main()
{
    int n;
    cin>>n;
    int a[1100];
    for(int i=1;i<=n;i++)
    {
            num=0;
            cin>>a[i];
            f(a[i],2);
            cout<<num<<endl;

    }
        return 0;
}


int n;
int next(int a,int b)
{
	if(a==1)
		return 1;
	if(a<b)
		return 0;
	int sum=0;
	for(;b<=a;b=b+1)
		if(a%b==0)
			sum=sum+next(a/b,b);

	return sum;
}
int main()
{
	int i,m;
	cin>>m;
	for(i=0;i<m;i=i+1)
	{
		cin>>n;
		cout<<next(n,2)<<endl;
	}
	return 0;
}


void Factorize(int n, int fact);
int number = 0;
int main()
{
	int times, num, i;
	cin >> times;
	for (i = 0; i < times; i++)
	{
		cin >> num;
		Factorize(num, 2);
		cout << number << endl;
		number = 0;
	}
	return  0;
}
void Factorize(int n, int fact)
{
	int i;
	for (i = fact; i <= sqrt(n); i++)
	{
		if (n % i == 0)
			Factorize(n / i, i);
	}
	number++;
}


int count;
void fun(int m,int n)
{   if(m <=sqrt(n)){
    for (int a=m;a <=sqrt(n);a++)
	{
	if(n%a==0){
		count ++; fun (a,n/a);}
	else count=count;
	}}
	else count=count;
 }
main()
{
	int n;scanf("%d",&n);
	for (int i =0;i<n;i++)
	{
		count=0;
		int num;scanf("%d",&num);
		for(int j=2;j<=sqrt(num);j++)
		{
			if(num%j==0)
			{count ++; fun(j,num/j);}
		}
		printf ("%d\n",count+1);
	}}


/*
 * fenjie.cpp
 *
 *  Created on: 2010-11-28
 *      Author: ???
 *      function: ????
 */
int solutionNumber(int a,int k){//??????????????
	int i;
	if(a==1) return 1;
	if(k>a) return 0;
	for(i=k;i<=a;i++)
	    if(a%i==0) return solutionNumber(a,i+1)+solutionNumber(a/i,i);
}
int main()
{
	int n,a[101];
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];//??????
		cout<<solutionNumber(a[i],2)<<endl;//????????????
	}
	return 0;
}


int a,n,sum=0;
void t(int m)
{
	int i,j;
	for(i=m;i<=a;i++)
	{
		if(a%i==0)
		{
			a=a/i;
			if(a==1)
			{
				sum+=1;
			}
			else t(i);
				a=a*i;
		}
	}
}

int main()
{
	int k;
	cin >> n;
	for(k=0;k<n;k++)
	{
		sum=0;
		cin >> a;
		t(2);
		cout << sum << endl;
	}
	return 0;
}


/*
 * e.cpp
 * ?????
 * ????: 2010-12-8
 * ???????
 */

int find_factor(int a,int b)
{
	int i,sum=0;
	if(a==1) return 1;
	for(i=b;i<=a;i++)
		if(a%i==0)
			sum=sum+find_factor(a/i,i);
	return sum;
}

int main(void)
{
	int n;
	cin>>n;
	int a;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		cout<<find_factor(a,2)<<endl;
	}
	return 0;
}


//???????a?????????????????a = a1 * a2 * a3 * ... * an???1 < a1 <= a2 <= a3 <= ... <= an?????????????????a = a???????
//Goofy 2010 12 05
void FenJie(int);
int counter=0;
int Befor=0;
int main()
{
	int n, x, i;
	cin>>n;
	for(i=0; i<n; i++)
	{
		cin>>x;
		counter=0;
		Befor=x;
		FenJie(x);
		cout<<counter<<endl;
	}
	return 0;
}
void FenJie(int x)
{
	int i, temp=Befor;//?????????
	if (x==1)
	{
		counter++;
		return;
	}
	for(i=Befor; i>1; i--)//??????
	{
		if (x%i==0)
		{
			Befor=i;
			FenJie(x/i);
		}
		Befor=temp;
	}
	return;
}


	int ispr(int t)
	{
    int v=sqrt(t*1.0)+1;
    for(int i=2; i<v; i++)
        if(t%i==0)
            return 0;
    return 1;
    }

int sum=0;
void fun(int n,int i) {
    if(n==1)
        sum++;
    while(i<=n) {
        if(n%i==0)
            fun(n/i,i);
        i++;
    }
    return ;
}

int main() {
    int n;
    scanf("%d",&n);
    while(n--) {
        int a;
        scanf("%d",&a);
        if(ispr(a)) {
            printf("1\n");
            continue;
        }

        int i=2,res=1;
        while(i<=a/2) {
            if(a%i==0) {
                sum=0;
                fun(a/i,i);
                res+=sum;
            }
            i++;
        }
        printf("%d\n",res);
    }
}


void main()
{
	int zy(int a,int b);
	int j,n,m,sum;
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{
		scanf("%d",&m);
		sum=zy(2,m);
		printf("%d\n",sum);
	}
}
	int zy(int a,int b)
	{
		int i,c,t=1;
		c=0;
	for(i=a;i*i<=b;i++)
		{
			if(b%i==0)
				c=zy(i,(b/i))+c;
		}
		if(i*i>b)
			c=c+1;
		return(c);
	}


int factor(int N,int min);
int main()
{
	int m,n,i,k;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m);
		k=factor(m,2);
		printf("%d\n",k);
	}

	return 0;
}
int factor(int N,int min)
{
	int result=1,i;
	if(N<min)
	return 0;
	for(i=min;i<N;i++)
	{
		if(N%i==0)
		result+=factor(N/i,i);
	}
	return result;
}


int Divide(int a,int b);
int main()
{
    int Times=0;
	int Num=0;
    int i=0;
    int Temp[100]={0};
    cin>>Times;
for (i=0;i<Times;i++)
    { cin>>Num;
	   Temp[i]=Divide(Num,Num);
    }
for (i=0;i<Times;i++)
   {cout<<Temp[i]<<endl;}
return 0;
}

int Divide(int a,int b)
{
	int Sum=0;
	int i=0;
    int Flag=0;
   if (a!=1)
	{ for (i=b;i>1;i--)
     {if (a%i==0)
         Sum+=Divide(a/i,i);
       Flag=1;
     }
    }
   if (Flag==0||a==1)
    {Sum=1;}
return Sum;
}


int factor(int,int);
int main()
{
	int n,num;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>num;
		cout<<factor(num,2)<<endl;
	}
	return 0;
}
int factor(int n,int min)
{
	int i;
	int num=1;
	if(n<min)
		return 0;
	else
	{
		for(i=min;i<n;i++)
		{
			if(n%i==0)
				num+=factor(n/i,i);
		}
	}
	return num;
}


int is_bottom,max;
int div_foo(int n,int min);

int main(){

  int N;
  cin>>N;
  for(int index=0;index<N;index++){
    int k;
    cin>>k;
    is_bottom=0;
    cout<<div_foo(k,2)+1<<endl;
  }

  return 0;
}

int div_foo(int n,int min){
  int cal=0;

  for(int iter=min;iter<=sqrt(n);iter++){
    if(!(n%iter)){
      cal++;
      int f1=n/iter,f2=iter,g;
      g=div_foo(f1,f2);
      cal+=g;
    }
  }
  return cal;
}


int sum;
void zhongshu(int qian,int a);
int main()
{
    int n,i,j,a[100];
    cin>>n;
    for(i=0;i<n;i++)
    cin>>a[i];
    for(i=0;i<n;i++)
    {  sum=0;
       zhongshu(2,a[i]);
       cout<<sum<<endl;
       }
    return 0;
}
void zhongshu(int qian,int a)
{
   int i,j,c;
   if(a==1)
   {
   sum=sum+1;
   return;
  }
   for(i=qian;i<=a;i++)
   {
      if(a%i==0)
         zhongshu(i,a/i);
   }
}


int sum=0,g,f;
int divide (int chushu,int a)
{
    int i;
    for (i=chushu;i<=a;i++)
    {
        if (a%i==0)
        {
            f=a/i;
            if (f>1)
            {g=i;divide (g,f);}
            else
            {
                sum++;
            }
         }

}   return sum;
}
int main()
{
    int n=0;
    cin>>n;
    int p=0;
    for (p=0;p<n;p++)
    {
       int b=0,c=2;
       cin>>b;
    sum=0;
    cout<<divide (c,b)<<endl;
    }

    return 0;
}


int number=0;
int l;
void sort (int n)
{
	int i;
	for (i=l;n/i>=i;i++)
	{
		if (n%i==0)
		{
			l=i;
			sort (n/i);
			if (n/i==1)
			   	number++;
		}
	}
	number++;
}
int main ()
{
	int n,m,k;
	cin >> n;
	for (k=0;k<n;k++)
	{
		l=2;
		number=0;
    	cin >> m;
    	sort (m);
    	cout << number << endl;
	}
	return 0;
}


int a;
int res;
int sum;
void dfs(int cnt){
    if(cnt*sum==a){res++; return;}
    if(cnt*sum<a){
        sum*=cnt;
        int j=a/sum;
        for(int i=cnt;i<=j;i++)
            dfs(i);
        sum/=cnt;
        return;
    }
}
int main(){
    int nCases;
    scanf("%d",&nCases);
    for(int i=0;i<nCases;i++){
        scanf("%d",&a);
        res=0; sum=1;
        for(int i=2;i<=a;i++)  dfs(i);
        printf("%d\n",res);
    }
    return 0;
}


int s(int n,int m){
if (n==1)return 1;
int an=0;
for (int i=m;i>1;i--){
if (n%i==0)an+=s(n/i,min(i,n/i));
}
return an;
}
int main(){
int N;
cin>>N;
int x;
for (N;N>0;N--){
cin>>x;
cout<<s(x,x)<<endl;
}
return 0;
}


/*
 *  Created on: 2011-11-18
 *      Author: 1100012870
 */

int su[40000],b[10000],ans;

void zhaosushu()
{
	int i,j,p;
	for(i=2;i<32768;i++)
	{
		p=1;
		for(j=2;j<=sqrt(i);j++)
			if(i%j==0){
				p=0;
				break;
			}
		if(p==0)continue;
		su[p]=1;
	}
}

void resolve(int a,int x)
{
	int i;
	if(a==1 || (su[a]==1 && a>=b[x-1])) {
		ans++;
		return;
	}
	for(i=2;i<=a;i++)
		if(a%i==0 && i>=b[x-1]){
			b[x]=i;
			resolve(a/i,x+1);
			b[x]=0;
		}
}

int main()
{
	int n,i,a;
	memset(su,0,sizeof(su));
	zhaosushu();
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		ans=0;
		memset(b,0,sizeof(b));
		resolve(a,1);
		cout<<ans<<endl;
	}
	return 0;
}


int num;
int fjys(int n,int m,int i,int d,int ji[20])
{
	int a;
	for(a=i;a<m;a++)
	{
		if(n%a==0)
		{
			ji[d]=a;
			int chenji=1,k;
			for(k=0;k<=d;k++)
				chenji=chenji*ji[k];
			if(chenji==m)
			{
				num++;
				break;
			}
			else
				fjys(n/a,m,a,d+1,ji);
		}
	}
	return num;
}
int main()
{
	int m,n,j,result=0,ji[20]={0};
	cin>>m;
	for(j=1;j<=m;j++)
	{
		num=0;
		cin>>n;
		result=fjys(n,n,2,0,ji);
		cout<<result+1<<endl;
	}
		return 0;
}


int panduansushu(int t)
{
	int i;
	for(i=2;i<t;i++)
	{
		if(t%i==0){break;}
	}
	if(i>t/2)return 1;
	else return 0;
}

int sum=0;
void fun(int n,int i)
{
	if(n==1)sum++;
	for(;i<=n;i++)
	{
		if(n%i==0)fun(n/i,i);
	}
}

void main()
{
	int a[100],i,res,j,n;
	scanf("%d",&n);
	for(j=0;j<n;j++)scanf("%d",&a[j]);
	for(j=0;j<n;j++)
	{
		if(panduansushu(a[j])==1)
		{
			printf("1\n");
		}
		else{ for(i=2,res=1;i<a[j]/2;i++)
		{
			if(a[j]%i==0){sum=0;fun(a[j]/i,i);res+=sum;}

		}
		printf("%d\n",res);}}
}


int p=0;

int factor(int a,int min)
{
	int sum=0;
	if(min>=a)return 1;
	for(int j=min;j<=a/min;j++)
	if (a%j==0)
		sum+=factor(a/j,j);
	return sum;
}

int main()
{
	int n=0,a=0;
	cin>>n;
	while(n>0)
	{
		cin>>a;
		if(a<=2) cout<<1<<endl;
		else cout<<factor(a,2)+1<<endl;
		n--;
	}
	return 0;
}


int f(int x,int k);
int main()
{
    int i=1,n,m;
    int result;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
    scanf("%d",&m);
    result=f(m,2);
    printf("%d\n",result);
    }
     return 0;
}
int f(int x,int k)
{
	int a=0;
    int i;
	if (x==1)
    return 1;
	for (i=k;i<=x;i++)
	{
	if (x%i==0)
    a=a+f(x/i,i);
    }
	return a;
}


int count;
void solve(int num,int a,int m)
{
	int i;
	if(num==1)
	{
	count++;
	return;}
	for(i=2;i<=num;i++)
	{
		if(i>=a&&(num%i)==0)
		solve(num/i,i,m+1);
	}
}
main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{

	int num,a;
	count=0;
	scanf("%d",&num);
	solve(num,0,1);
	printf("%d\n",count);}
}


int yz[100],all=0;
int yinzi(int num,int amax)
{
	int i,j=0,geshu=0,key=num;
	if(num==1) return 1;
	else
	{
		for (i=amax;i<all;i++)
		{
			if(num%yz[i]==0)
			{
				num=num/yz[i];
				geshu=geshu+yinzi(num,i);
				num=key;
			}
		}
		return geshu;
	}
	return 0;
}
int main ()
{
	int num,n,i,c,j=0,k;
	cin>>n;
	for(k=0;k<n;k++)
	{
		cin>>num;
		if(num==1) cout<<1<<endl;
		else
		{
			j=0;
			for (i=2;i<=num;i++)
			{
				if(num%i==0)
				{
					yz[j]=i;
					j++;
				}
			}
			all=j;
			cout<<yinzi(num,0)<<endl;
		}
	}
	return 0;
}


int factorize(int n,int j)
{
	int F=1;
	for(;j<=sqrt(n);j++)
		if(n%j==0)
			F+=factorize(n/j,j);
	return F;
}
int main()
{
	int i,m,n[1000];
	scanf("%d",&m);
	for(i=0;i<m;i++)
		scanf("%d",&n[i]);
	for(i=0;i<m;i++)
		printf("%d\n",factorize(n[i],2));
	return 0;
}


/*
 * fengjie.cpp
 *
 *  Created on: 2013-11-23
 *      Author: sony
 */

int sum;

void f(int x,int i){
	if (x == 1) sum++;
	for(;i<=x;i++)
		if (x%i == 0) f(x/i,i);
	return;
}

int main(){
	int t,a,i=2;
	cin>>t;//????????
	for (a = 0; a<t ; a++){
		int x;
		cin >> x;
		int ans = 1;
		for(i = 2; i<sqrt(x) ; i++){
			sum = 0;
			if(x%i == 0) f(x/i,i);
			ans = ans + sum;
		}
		cout<<ans<<endl;
	}
	return 0;
}


int factors(int n,int min)
{
     int varieties=0,i;
     if(n==1)  return 1;
     else
     {
            for(i=min;i<=n;i++)
            {
                if(n%i==0)
                {
                    varieties+=factors(n/i,i);
                }
            }
        }
        return varieties;
}
int main()
{
    int n;
    cin>>n;
    int a[n],b[n];
    int i;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        b[i]=factors(a[i],2);
    }
    for(i=0;i<n;i++)
    cout<<b[i]<<endl;
    return 0;
}


int t;
int main()
{int n,i,a[100];
void fenjie(int x,int y);
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{t=0;
fenjie(2,a[i]);
printf("%d\n",t);
}
return 0;
}

void fenjie(int x,int y)
{int j;
if(y==1){
t++;
return;}
for(j=x;j<=y;j++)
{if(y%j==0)
fenjie(j,y/j);
}

}


int count;

void fun(int i, int j)
{
	int k;
	for(k=i; k<=sqrt(j); k++) {
		if(j%k == 0) {
			count++;
			fun(k,j/k);
		}
	}
}
int main()
{
     int N,turn,c;
      scanf("%d",&turn);
      for(c=1;c<=turn;c++)
      {
	int n,i;
	scanf("%d",&n);
	for(i=2; i<=sqrt(n); i++) {
		if(n%i == 0) {
			count++;
			fun(i,n/i);
		}
	}
	printf("%d\n",count+1);
	count=0;
}

}


int fun(int x,int y)
{
	int i,sum=0;
	for(i=x;i*i<=y;i++)
		if(y%i==0) {sum++;sum+=fun(i,y/i);}
    return sum;
}
int main()
{
	int n,i,sum;
	scanf("%d",&n);
	while(n>0)
	{	n--;
		scanf("%d",&i);sum=1;
		sum+=fun(2,i);
		printf("%d\n",sum);
	}
	return 0;
}


int s;
void search(int a,int k)
{
 	 if(a==0)
 	 return ;
 	 if(a==1)
 	 {
 	 return;
	 }
 for(int i=2;i<a;i++)
 {
   if(a%i==0&&a/i>=i&&i>=k&&a/i>=k)
   {
   s++;
   search(a/i,i);
   }
 }
 return ;
}
int main()
{
int n,a;
cin>>n;
for(int i=0;i<n;i++)
{
s=1;
cin>>a;
search(a,1);
cout<<s<<endl;
}

  return 0;
}


/*1090 ????*/

int num;

void divide(int a,int k)
{
	int i;
	if(a==1) num++;//??????????????
	for(i=k;i<=a;i++)//????????
	    if(a%i==0) divide(a/i,i);
}

int main()
{
	int t;
	cin>>t;
	while(t--)
	{
			int n;
			cin>>n;
			num=1;
			int i;
			for(i=2;i*i<=n;i++)
				if(n%i==0) divide(n/i,i);
			cout<<num<<endl;
	}
    return 0;
}


int prime(int n)
{
	int i,judge=1;
	for(i=2;i<n;i++)
	{
		if(n%i==0)
			judge=0;
	}
		return judge;
}
int function(int number,int x)
{
	int temp=0,i,result=0;
	if(!prime(number))
	{
		for(i=x;i<=number;i++)
			if(number%i==0)
			{
				x=i;
				temp=number/i;
				result+=function(temp,x);
			}
	}
	else if((number>=x||number==1)&&prime(number))
		result=1;
	return result;
}
int main()
{
	int i,times,number;
	cin>>times;
	for(i=0;i<times;i++)
	{
		cin>>number;
		cout<<function(number,2)<<endl;
	}
	return 0;
}


int dp[40000][200]={0};
int main()
{
    int n,i,N;
    int mm( int , int );

    cin>>n;
    for(i=1;i<=n;i++)
    {
                     cin>>N;
                     cout<<mm(N,2)<<endl;
                   // if(prime(N)) cout<<"haha";
    }

    return 0;
}

int mm( int n, int i)
{
    int sum=1;

    if(dp[n][i]>0) return dp[n][i];

    for(int j=i; j<=sqrt(n);j++)
    {
             if(n%j==0)
             {
                       sum += mm(n/j,j);
             }
    }
    dp[n][i]=sum;
    return sum;
}


int prime(int n, int m )
{
	int i,total=1;
	if(n<m)return 0;

	for(i=m;i<=n;i++)
	{
		if(n%i==0)
			total+=prime(n/i,i);
	}
	return total;
}
void main()
{
	int n,b[2000],b0,i;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&b0);
		b[i]=prime(b0,2);
	}
	for(i=0;i<=n-2;i++)
	{
		printf("%d\n",b[i]);
	}
		printf("%d",b[n-1]);
}


int sushu(int b)
{
	int flag=1,i;
	if(b==2)
		return 1;
	if(b%2==0)
		return 0;
	for(i=2;i<=b/2;i++)
	{
		if(b%i==0)
		{
			flag=0;
			break;
		}
	}
	if(flag==0)
		return 0;
	else
		return 1;
}
int number(int a,int b)
{
	int i,total=1;
	if(sushu(a))
	{
		total=1;
		return total;
	}
	for(i=b;i<=a;i++)
	{

		if(a%i==0&&a/i>=i)
		{
			total=total+number(a/i,i);
		}
	}
	return total;
}
void main()
{
	int n,i,A[100],B[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&A[i]);
		B[i]=number(A[i],2);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",B[i]);
	}
}


int F(int n,int a)
{
  if(n==1)   return 1;
  if(a==1)   return 0;
  if(n%a==0) return F(n/a,a)+F(n,a-1);
             return F(n,a-1);
}
main()
{
    int n,a,i;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%d",&a);
        printf("%d\n",F(a,a));
    }
}


int f(int m, int n)
{
    int i, count = 0, flag = 0;
    if (m == 1)
        return 1;
    for (i = n; i > 1 ; i--)
    {
        if (m % i == 0)
        {
            count += f(m / i, i);
            flag = 1;
        }
    }
    if (flag)
        return count;
    else
    return 0;
}
int main()
{
    int n, k, m, temp;
    cin >> n;
    for (k = 0; k < n; k++)
    {
        cin >> m;
        cout << f(m, m) << endl;
    }
    return 0;
}


main()
{
	int find(int m,int k);
	int n,y,d,c;
	scanf("%d",&c);
	for(d=0;d<c;d++)
	{
	scanf("%d",&n);
	y=find(n,1)	;
	printf("%d\n",y);
}
}
int find(int m,int k)
{
	int i,t=1,n=0,x=0,a,s=0;
	for(i=2;i<=m;i++)
	{
		if(m%i==0)n++;
	}
	if(n==1||m==1)return 1;
	else
  {
	for(i=2;i<=m;i++)
	{
		if(m%i==0&&m/i>=i&&i>=k)
		{

			k=i;
			t=t+find(m/i,k);

		}

	}
   }

	return t;
}


int function(int a, int m)
{
	int sum=1,i;
	if(a>m)
		return 0;
	else
	{
		for(i=a;i<m;i++)
		{
			if(m%i==0)
				sum=sum+function(i,m/i);
		    else
			continue;
		}
	return sum;

	}
}

void main()
{
	int n,i,m[100];

	scanf("%d",&n);

	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&m[i]);
	}

	for(i=0;i<=n-1;i++)
	{
		printf("%d\n",function(2,m[i]));

	}
}


int p(int x)
{
     int i;
     for(i=2;i<=sqrt(x);i++) if(x%i==0) return(0);
     return(1);
}
int f(int n,int m)
{
     int t,i;
     if(n<m) return(0);
     else if(p(n)==1) return(1);
     else if(m==1)
     {
          t=1;
          for(i=m+1;i<n;i++)
          {
               if(n%i==0) t=t+f(n/i,i);
          }
     }
     else if(m!=1)
     {
          t=1;
          for(i=m;i<n;i++)
          {
               if(n%i==0) t=t+f(n/i,i);
          }
     }
     return(t);
}
main ()
{
     int x,y,z,j;
     scanf("%d",&y);
     for(j=0;j<y;j++)
     {
           scanf("%d",&x);
           printf("%d\n",f(x,1));
     }

}


int tot;

void find(int m,int n)
{
    int i,j,k;
    if (m==1) tot=tot+1;
    else
    {
        for (i=n;i<=m;i++)
        if(m%i==0)
           find (m/i,i);
    }
}

int main()
{
    int i,j,k,m,n;
    cin >>n;
    for (i=1;i<=n;i++)
    {
        tot=0;
        cin >>m;
        find(m,2);
        cout <<tot<<endl;
    }
    cin >>n;
    return 0;
}


int num=0;
void count(int m,int j)
{
	int i;
	if(m==1) num++;
	for(i=j;i<=m;i++)
	{
		if(m%i==0) {count(m/i,i);}
		else continue;}
}
int main()
{
	int n,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		int m;
		cin>>m;
		num=0;
		count(m,2);
		cout<<num<<endl;
	}
	return 0;
}


int f(int n,int min){
	int i,result=1;
	if(n<min)return 0;
	for(i=min;i<n;i++)
		if(n%i==0)result+=f(n/i,i);
	return result;
}
void main()
{
	int cases,a;
	scanf("%d",&cases);
	while(cases--){
		scanf("%d",&a);
		printf("%d\n",f(a,2));
	}
}


int count;
void f(int x,int y)
{
	int i=0;
	if(x>=y)
	for(i=y;i<=x;i++)
	{
		if(i==x)count++;
		if(x%i==0) f(x/i,i);
	}
}
main()
{
	int t;
	int n,i,x,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		count=0;
		scanf("%d",&x);
		f(x,2);
		printf("%d\n",count);
	}
}


int num=1,k=0;
int count(int n)
{
	for(int i=2;i<=sqrt(n);i++)
	{
		if(n%i==0&&i>=k)
		{
			num++;
			k=i;
			count(n/i);
			k=0;
		}
	}
	return (num);
}
int main()
{
	int i,n,a[100];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<n;i++)
	{cout<<count(a[i])<<endl;num=1;k=0;}
	return 0;
}


int main()
{
	int f(int x, int y);
	int n,m,i,z;

	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m);
		z=f(1,m);
		printf("%d\n",z);
	}

	return 0;
}

int f(int x, int y)
{
	int z,t=1,l=0,p;
	p=(int) pow(y,0.5);
	if(x==1) x=2;
	for(z=x;z<=p;z++)
	{
		if(y%z==0 && z!=y)
		{
			t+=f(z,y/z);
		}
	}

	return t;
}


int num=0;
int judge1(int n)
{
	int i;
	if(n==2||n==3||n==5)
		return 1;
	if(n==4)
		return 0;
	for(i=2;i*i<n;i++)
	{
		if(n%i==0)
		{return 0;break;}
	}
	if(i*i>n)
		return 1;
}
void divide(int n,int d)
{
	for(int i=d;i*i<=n;i++)
	{
		if(n%i==0)//&&judge1(i))
		{
			num++;
			divide(n/i,d);
		}
		d++;
	}
}
int main()
{
	int n,m;
	cin>>n;
	while(n)
	{
		n--;
		cin>>m;
		num=1;
		divide(m,2);
		cout<<num<<endl;
	}
	return 0;
}


int f(int q,int x)
{
	if(q<x)
	{	int i,k,p,sum;
		k=0;sum=0;p=0;
		for(i=2;i<=x/2;i++)
			if(x%i==0) k=k+1;
		if(k==0) return 1;
		else
		{	for(i=q;i<=sqrt(x);i++)
			  if(x%i==0)sum=sum+f(i,x/i);

			return sum+1;
			p=0;
			sum=0;
		}
	}
	else
	{	if(q==x) return 1;
		else
		return 0;
	}
}

int main()
{
	int n,i,x,sum;
	scanf("%d",&n);

	for(i=0;i<n;i++)
	{
		scanf("%d",&x);
		sum=f(2,x);
		printf("%d\n",sum);
	}
}


int num =0;
void fenjie(int n,int x)
{
	extern int num;
	if ( n == 1)
		num ++;
	else

	for(int i = x; i<=n;i++)
		if(n % i ==  0)
			fenjie(n/i,i);
}
int main()
{
int n,k;
cin >> k;
for(int j = 0;j!= k;j++)
{extern int num;
num =0;
cin >> n;
fenjie(n,2);
cout<<num<<endl;
}
return 0;
}


int c;
void cal(int n,int k);
int main(int argc)
{  int m,n,j;
   cin>>m;
   for (j=1;j<=m;j++)
   { cin>>n;
    c=0;
	cal(n,1);
   cout<<c<<endl;}

	return 0;

}
void cal(int n,int k)
{  if (n==1)
{c++;
return;}
int i;
for (i=2;i<=n;i++)
{ if (n%i==0&&i>=k)
{cal(n/i,i);}}
}


void fenjie(int, int, int);
int g_num, g_count;
int main()
{
	int n, i;
	cin >> n;
	for(i = 1; i <= n; i++ )
	{
		g_count = 0;
		cin >> g_num;
		fenjie(2, g_num, 1);
		cout << g_count << endl;
	}
	return 0;
}
void fenjie(int a, int num, int sum)
{
	while( a <= g_num )
	{
		sum *= a;
		if( sum == g_num )
			g_count++;
		if( sum < g_num )
			fenjie(a, g_num, sum);
		if( sum > g_num )
			return;
		sum /= a;
		a++;
	}
}


int Factorization(int,int);
int main()
{
	int n,x,i,k;
	cin>>n;
	for(i=0;i<n;i++)
	   {
		   cin>>x;
		   cout<<Factorization(x,2)+1<<endl;
	   }
	return 0;
}
int Factorization(int x,int y)
{
	int i;
	int sum=0;
	if(x<4)
		return 0;
	else
		{
			for(i=y;i<=sqrt((double)x);i++)
				if(x%i==0)
					sum+=1+Factorization(x/i,i);
			return sum;
	    }
}


int zhi(int a);
int yin(int m,int t);
int main()
{
	int n,i=0;
	int str[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	scanf("%d",&str[i]);
	i=0;
	for(i=0;i<n;i++)
	printf("%d\n",yin(str[i],2));
return 0;
}

int zhi(int a)
{
	int k=2,flag=0;
	for(k=2;k<=a/2;k++)
	{
		if(a%k==0)
		{	flag=1;
			break;
		}
	}
	return flag;

}

int yin(int m,int t)
{
	int j=t,c=0,b=0,x=0;
	int str1[10000][2];
	if(m<t&&m!=1)
		return 0;
	  else if(m==1)
		  return 1;
	  else if(zhi(m)==0)
		  return 1;
	   else
		   for(j=t;j<=m;j++)
		 {
			 if(m%j==0)
			 { str1[c][0]=m/j;
			     str1[c][1]=j;
				 c++;

			 }
		 }
		 for(b=0;b<c;b++)
		 {
              x+=yin(str1[b][0],str1[b][1]);
		 }
		 return x;
}


int countt;
void f(int p,int q)
{
	for(int m=p;m<=sqrt(q);m++)
	{
		if(q%m==0)
		{countt++;
		f(m,q/m);}
	}

}
int main()
{
	int n,num,i;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>num;
		countt=0;
		for(int k=2;k<=sqrt(num);k++)
		{
		    if(num%k==0)
			{
				countt++;
			   f(k,num/k);
			}
		}
		cout<<countt+1<<endl;;
	}
	return 0;
}


int ans = 0;
int  work(int p,int k)
{	if (p==1) {ans++; return (p*k,k);}
	for(int i =k;i <= p;i ++){
		if(p % i == 0){
			work(p / i,i);

		}
	}
}
int main()
{
	int n;
	scanf("%d",&n);
	while(n--){
		ans = 0;
		int t;
		scanf("%d",&t);
		work(t,2);
		//ans = work(t);
		printf("%d\n",ans);
	}

	return 0;
}


struct node
{
	int s,n;
};
void cpy_clr(struct node a[],struct node b[])
{
	int i;
	for(i=0;i<=MAX&&(a[i].s!=0||b[i].s!=0);i++)
		if(b[i].s!=0)
		{a[i].s=b[i].s;a[i].n=b[i].n;b[i].s=0;b[i].n=0;}
		else
		{a[i].s=0;a[i].n=0;b[i].n=0;}
}
int chklst(struct node a[],int n)
{
	int i;
	int result=0;
	for(i=0;a[i].s!=0;i++)
	{	if(a[i].s!=n){result=0;break;}
		else result++;
	}
	return result;
}
void init(struct node a[])
{
	int i;
	for(i=0;i<MAX;i++) {a[i].s=0;a[i].n=0;}
}
void main()
{
	struct node a[MAX],b[MAX];
	int i,j,k,l,_n,n,sum=0;
	scanf("%d",&n);
	while(n--)
	{
	scanf("%d",&_n);
	for(l=2;l<_n;l++)
		if(_n%l==0)
		{	init(a);init(b);
			a[0].s=l;a[0].n=l;
			while(chklst(a,_n)==0&&a[0].s!=0)
			{
				i=0;k=-1;
				if(a[0].s==0) break;
				while(a[i].s!=0)
				{
					if(a[i].s==_n) sum++;
					else
					{
						for(j=a[i].n;j<=(_n/a[i].s);j++)
							if(_n%(a[i].s*j)==0)
							{b[++k].s=a[i].s*j;b[k].n=j;}
					}
					i++;
				}
				cpy_clr(a,b);
			}
			i=0;
			while(a[i].s!=0)
			{
				if(a[i].s==_n) sum++;
					i++;
			}
		}
	printf("%d\n",++sum);
	sum=0;
	}
}


int main()
{
  int fj(int m,int min);
  int t,i,a[100];
  cin>>t;
  for(i=1;i<=t;i++)
     {

       cin>>a[i];
       cout<<fj(a[i],2)<<endl;
     }

  return 0;
}
   int fj(int m,int min)
{
   int counter=1;
   int i;
   if(m<min)
     return 0;
     for(i=min;i<m;i++)
         if(m%i==0)
         {
           counter=fj(m/i,i)+counter;
         }
   return counter;

}


int divide(int,int);
int main(void)
{
	int n,a;
	cin>>n;
	while(n!=0)
	{
		cin>>a;
		cout<<divide(a,2)<<endl;
		n--;
	}
    return 0;
}

int divide(int x,int t)
{
	int i,sum=0;
	if(x==1) return 1;                      //????x?1
	for(i=t;i<=x;i++)
	{
		if(x%i==0) sum+=divide(x/i,i);      //?i?x????x/i???????????????i?
	}
	return sum;
}


int number(int m,int x)
{
    int a,b,c,n,l,k,r;
    k=(int)sqrt(m);
    if(x>m)
    {
        return 0;
    }
    else if(x>k)
    {
        return 1;
    }
    else
    {
        l=1;
        for(a=x;a<=k;a++)
        if(m%a==0)
        l=l+number(m/a,a);
        else;
        return l;
    }
}

main()
{
     int n,a;
     scanf("%d",&n);
     for(a=1;a<=n;a++)
     {
            int m,b;
            scanf("%d",&m);
            b=number(m,2);
            printf("%d\n",b);
     }
}


/*
 *????????.cpp
 *?????
 *????: 2012-11-25
 *???????????????
 */

int b, j, f[1010];

void factorization(int x)
{
	int now, i;
	for (i = 2; i <= x; i++)
	{
		if (x % i == 0 && i >= f[j])
		{
			f[++j] = i;
			now = x / i;
			if (now == 1)
			{
				b++;
			}
			else
			{
				factorization(now);
			}
			j--;
		}
	}
	return;
}
int main ()
{
	int n, i, num;

	cin >> n;
	for (i = 0; i < n; i++)
	{
		b = 0;
		j = 0;
		memset (f, 0, sizeof(f));
		cin >> num;
		factorization(num);
		cout << b << endl;
	}
	return 0;
}


int g(int y)
{
	int i;
	for(i=0;;i++)
	{
		if(i*i>y)
			break;
	}
	return i-1;
}
int f(int x,int b)
{
	int p,a[100],t=0,k=0;
	p=g(x);
	if(x==2)
		return 0;
	else
	{
	for(int i=b;i<=p;i++)
	{
		if(x%i==0)
		{
			a[t]=i;
			t++;
		}
	}
	if(t==0)
		return 0;
	else
		for(int i=0;i<t;i++)
			k=k+f(x/a[i],a[i])+1;
		return k;
	}
}
int main()
{
	int n,a;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a;
		cout<<f(a,2)+1<<endl;
	}
	return 0;
}


int main()
{
	int f(int k,int m);
	int n;
	scanf("%d",&n);
	int i;
	for(i=1;i<=n;i++)
	{
		int k;
		scanf("%d",&k);
		printf("%d\n",f(k,2));
	}

	return 0;
}
int  f(int k,int m)
{
	int i;
	int j=0;
	if(k<=m)
	{
		if(k==m){

		j=1;
		return j;
		}
		else
		{
			j=0;
			return j;
		}
	}
	else
	{
	for(i=m;i<=k;i++)
	{
		if(k%i==0&&k/i!=1)
			j=j+f(k/i,i);
		if(k%i==0&&k/i==1)
			j=j+1;
	}
	return j;
	}

}


void factor(int x,int limit);
int result;
int main()
{
	int n;
	scanf("%d",&n);
	int input;
	for(int i=0;i<=n-1;i++)
	{
		scanf("%d",&input);
		result=1;//limit?2?????result=1;
		factor(input,2);//limit?2?????result=1;
		printf("%d\n",result);
	}
	return 0;
}
void factor(int x,int limit)
{
	int remainder;
	if(x<limit)
	{
		return;
	}
	for(int i=limit;i<=x;i++)
	{
		remainder=x%i;
		if(remainder==0)
		{
			if(x/i>=i)
			{
				result++;
				factor(x/i,i);
			}
		}
	}
}


int fenjie(int , int);

int fenjie(int q1, int n1)
{
	int s1, i1;
	if (q1 > n1)
		return 0;
	else
	{
		s1 = 0;
		for (i1 = q1; i1 <= n1; i1++)
		{
			if ((i1 >= 2) && (n1%i1 == 0) && (n1/i1 >= i1))
			{
				s1++;
				s1 = s1 + fenjie(i1, n1 / i1);
			}
		}
		return s1;
	}
}

int main()
{
	int m, i, n;
	cin >> m;
	for (i = 1; i <= m; i++)
	{
		cin >> n;
		cout << fenjie(1,n)+1 << endl;
	}
	return 0;
}


void main()
{
	int zy(int a,int b);
	int j,n,m,sum;
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{
		scanf("%d",&m);
		sum=zy(2,m);
		printf("%d\n",sum);
	}
}
	int zy(int a,int b)
	{
		int i,c,t=1;
		c=0;
		if(a==0)
			c=c+1;
		else
		{for(i=a;i*i<=b;i++)
		{
			if(b%i==0)
				c=zy(i,(b/i))+c;
		}
		if(i*i>b)
			c=c+1;}
		return(c);
	}


int t(int, int);
int s, j, k1;

int main()
{
	int a, n, i;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> a;
		s = 1;
		k1 = 0;
		for (j = 2; j <= sqrt((double) a); j++)
		{
			if (a % j == 0)
				t(a / j, j);
		}
		cout << s << endl;
	}
	return 0;
}

int t(int a, int b)
{
	int k;
	for (k = b; k <= a; k++)
	{
		if (a % k == 0)
		{
			if (a / k == 1)
			{
				s = s + 1;
				break;
			}
			t(a / k, k);
		}
	}
	return 0;
}


int a;
int fj(int x, int y);
int main()
{
	int n;
	cin >> n;
	int i;
	for (i = 1; i <= n; i++)
	{
	   cin >> a;
	   cout << fj(a, 2) << endl;
	}
	return 0;
}
int fj(int x, int y)
{
	int xnumber = 1;
	int i;
	int b = sqrt(x);
	if (x == 1) return 0;
	else
		for (i = y; i <= b; i++)
		{
			if (x % i == 0) xnumber = xnumber + fj(x / i, i);
		}
		return xnumber;
}


int f(int x,int y)
{
	if(y==x)
		return 1;
	if(y>x)
		return 0;
	if(x%y==0)
		return f(x,y+1)+f(x/y,y);
	else
		return f(x,y+1);
}
int main()
{
	int n,x;
	cin>>n;
	int z,i;
	i=n;
	while(i>0)
	{
		i=i-1;
		cin>>x;
		z=f(x,2);
		cout<<z<<endl;
	}
	return 0;
}


int fenjie(int x,int k)
{
	int t=1,i;
	if(k>x)
	{
		return 0;
	}
	for(i=k;i<x;i++)
	{
		if(x%i==0)
		{
			t=t+fenjie(x/i,i);
		}
	}
	return t;
}
int main()
{
	int j,p,n,a[101];
	scanf("%d",&n);
	for(j=0;j<=n-1;j++)
	{
		scanf("%d",&a[j]);
	}
	for(j=0;j<=n-1;j++)
	{
		printf("%d",fenjie(a[j],2));
		printf("\n");
	}
	return 0;
}


int factor(int a,int min)
{
	int count=0;
	for(int i=min;i<=a;i++)
	{
		if(i==a)
		{
			count+=1;
		}
		if(a%i==0)
		{
			count+=factor(a/i,i);
		}
	}
	return count;
}
int main()
{
	int n;
	cin>>n;
	while(n--)
	{
		int a;
		cin>>a;
		int result=factor(a,2);
		cout<<result<<endl;
	}
	return 0;
}


int qipa(int p,int q)    // ?p???????????q??????
{
    int i,l,s=0;
    if(p==1) return 1;
    for(i=p;i>1;i--)
      if(p%i==0 && i<=q)
        s+=qipa(p/i,i);
    return s;
}
int main()
{
  int i,j,n,m,t;
  scanf("%d",&n);
  for(i=1;i<=n;i++)
  {
    scanf("%d",&m);
    t=qipa(m,m);
    printf("%d\n",t);
  }
return 0;
}


int main()
{
	int func(int a,int b);
	int n;
	cin>>n;
	while(n--){
		int number;
		cin>>number;
		cout<<func(number,number)<<endl;
	}
	return 0;
}

int func(int a,int b)
{
	if(a==1){
		return 1;
	}
	if(b==1){
		return 0;
	}
	if(a%b==0){
		return func(a/b,b)+func(a,b-1);
	}
	return func(a,b-1);
}


int sum=0;
int main()
{ void shu(int a,int b);
  int n=0,i=0,a=0,c=0,j=0;
  scanf("%d",&n);
  for(i=1;i<=n;i++)
  {  scanf("%d",&a);
     for(j=2;j<=sqrt((double)a);j++)
       { if(a%j==0)
         { sum=sum+1;
           shu(j,a/j);
				}

			}

	printf("%d",sum+1);
	if(i<n)
	 printf("\n");
	sum=0;

  }

  return(0);
}
void shu(int a,int b)
{ int i=0;
  for(i=a;i<=sqrt((double)b);i++)
    {  if(b%i==0)
         { sum=sum+1;
           shu(i,b/i);

				}
		}
}


int factor(int N,int min)
{
  int result=1,i;
  if(N<min)
  {
    return 0;
  }
  for(i=min;i<N;i++)
  {
    if(N%i==0)
    {
      result+=factor(N/i,i);
    }
  }
  return result;
}
main()
{
  int n=0,i=0,x=0,y=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
    	scanf("%d",&x);
	y=factor(x,2);
	printf("%d\n",y);
  }
  return 0;
}


int d(int,int);
int main()
{
	int i,n,x;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>x;
		cout<<d(x,2)<<endl;
	}
	return 0;
}
int d(int x,int y)
{
	int j,num=1;
	if(x==1)
		return 0;
	if(x==2)
		return 1;
	for(j=y;j<=(int)sqrt((double)x);j++)
		if(x%j==0)
			num+=d(x/j,j);
	return num;
}


int j;
int discharge(int x,int y)
{
	int a=1;
	for(int i=y;i<=(sqrt((double)x));i++)
	{
		if(x%i==0)
		{
			a=a+discharge(x/i,i);
		}
	}
	return a;
}
int main()
{
	int n,x,r[100];
	cin>>n;
	for(j=0;j<n;j++)
	{
		cin>>x;
		r[j]=discharge(x,2);
	}
	for(j=0;j<n-1;j++)
	{
		cout<<r[j]<<endl;
	}
	cout<<r[n-1];
	return 0;
}


int f(int t)
{
    double v=sqrt(t)+1;
    for(int i=2; i<v; i++)
    if(t%i==0) return 0;
    return 1;
}
int sum=0;
void fun(int n,int i)
{
     if(n==1)
     sum++;
     while(i<=n)
     {
     if(n%i==0)
     fun(n/i,i);
     i++;
    }
    return ;
}
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
      {
      int a;
      scanf("%d",&a);
      if(f(a)>0)
      {
      printf("1\n");
      continue;
      }
      int i=2,K=1;
      while(i<=a/2)
      {
        if(a%i==0)
        {
        sum=0;
        fun(a/i,i);
        K+=sum;
        }
        i++;
      }
        printf("%d\n",K);
      }
}


int dividemin(int a,int minyinzi){
	int num=0;
	if(a==1)num++;
	else for(int i=minyinzi;i<=a;i++)
	{
		if(a%i==0)num=num+dividemin(a/i,i);
	}
	return num;
}
int main(){
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<=n-1;i++)
		cin>>a[i];
	for(int i=0;i<=n-1;i++)
		//cout<<divide(a[i],a[i])<<endl;
		cout<<dividemin(a[i],2)<<endl;

}


int f(int,int);
int main()
{
	int N;
	cin>>N;
	int i;
	for(i=1;i<=N;i++)
	{

		int a;
		cin>>a;
		cout<<f(a,2)<<endl;
	}
	return 0;
}
int f(int n,int m)
{
	int j;
	int number=1;
	for(j=m;j<=(int)sqrt(n);j++)
	{
		if(n%j==0)
		{
			number=number+f(n/j,j);
		}
	}
	return number;
}


int a=0,s=0;
void find(int n,int prim)
 {
  if (n==a){s++;}
  else
   {
    for (int i=prim;i<=a/n;i++)
     if ((a%(n*i)==0)){find(n*i,i);}
   }
 }
int main()
{int n=0;cin>>n;
for (int i=1;i<=n;i++)
 {
  cin>>a;s=0;
  for (int i=2;i<=a;i++)
   {
    if (a%i==0) {find(i,i);}
   }
   cout<<s<<endl;
 }
return 0;
}


int f(int a,int min){
	if(a<min)
		return 0;
	int sum=1;
	for(int i=min;i<a;i++){
		if(a%i==0)
			sum+=f(a/i,i);
	}
	return sum;
}
int main(){
	int n;
	int a[100];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
		a[i]=f(a[i],2);
	}
	for(int i=0;i<n;i++){
		printf("%d\n",a[i]);
	}
	return 0;
}


int f(int q,int x)
{
	if(q<x)
	{	int i,k,p,sum;
		k=0;sum=0;p=0;
		for(i=2;i<=x/2;i++)
			if(x%i==0) k=k+1;
		if(k==0) return 1;
		else
		{	for(i=2;i<=sqrt(x);i++)
			{	if(x%i==0)
				{	if(i<q) continue;
					else sum=sum+f(i,x/i);
				}
			}
			return sum+1;
			p=0;
			sum=0;
		}
	}
	else
	{	if(q==x) return 1;
		else
		return 0;
	}
}

//???
int main()
{
	int n,i,x,sum,p;
	p=0;
	sum=0;
	scanf("%d",&n);

	for(i=1;i<=n;i++)
	{
		scanf("%d",&x);
		sum=f(2,x);
		printf("%d\n",sum);
	}

	return 0;
}


int su(int input)//?????????
{
	int ju=1;
	for(int i=2;i<sqrt(input);i++)
	{
		if(input%i==0) ju=0;
		break;
	}
	return ju;
}
int fenjie(int input, int k)//k???????????input??????
{
	int ret=1;//re??????????????
	for(int i=k;i<=sqrt(input);i++)
	{
		if(input%i==0)
		{
			if(su(input/i)==0);//????????????????????
			{
				ret=fenjie(input/i,i)+ret;
			}
		}
	}
	return ret;
}
int main()
{
	int input,num,sol;
	cin>>num;
	while(num--)//????
	{
		cin>>input;
		cout<<fenjie(input,2)<<endl;//sol??????????
	}
	return 0;
}


void main()
{
	int n,a[100],i;
	void fen(int a[],int x);
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	fen(a,n);
}
void fen(int a[],int x)
{
	int k,b=2,c,t;
	int look(int x,int y);
    for(k=0;k<x;k++)
	{
		c=a[k];
		t=look(c,b);
		printf("%d\n",t);
	}
}
int look(int x,int y)
{
	int total=1,p;
	if(x/y==0)
	{	return 0;}
	else
	{
		for(p=y;p<x;p++)
		{
			if(x%p==0)
			{
				total=total+look(x/p,p);
			}
		}
	}
	return total;
}


int min(int a,int b)
{
    if(a>=b)
    return b;
    else
    return a;
}

  int f(int a,int b)
{
    int count=0;
    int k[32768]={0};
    if(a==1)
    return 1;
    else
    {
    int i,j;
    for(i=min(a,b);i>=2;i--)
    {
        if(a%i==0)
        k[i]=i;
    }
    for(j=0;j<32768;j++)
    {
         if(k[j]!=0)
         {
         count=count+f(a/k[j],j);
         k[j]=0;
         }
    }
    return count;
    }
}
main()
{
      int n,i,a,number;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
      scanf("%d",&a);
      number=f(a,a);
      printf("%d\n",number);
      }
}


int cut(int m,int l){
	int sum=1;
	for(int i=l;i<=sqrt((double)m/l);i++){
		if((m/l)%i==0){
		sum+=cut(m/l,i);
		}
	}
	return sum;
}

int main (){
	int n;
        cin>>n;
for(int i=0;i<n;i++){
        int t=0;
        cin>>t;
	cout<<cut(2*t,2);
	if(i<n-1) cout<<endl;
}

}


int n;
void count(int x,int y)
{
	int i;
	if(x==1) n=n+1;
	else
	{
		for(i=y;i<=x;i++)
		{
			if(x%i==0) count(x/i,i);
		}
	}
}
int main()
{
	int i,k,t;
	void count(int x,int y);
	scanf("%d",&k);
	for(i=0;i<k;i++)
	{
		n=0;
		scanf("%d",&t);
		count(t,2);
		printf("%d\n",n);
	}
	return 0;
}


int fib(int a,int e);
int main(){
	int n,b,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&b);
		printf("%d\n",fib(b,2));
	}
	scanf("%d",&n);
	return 0;
}
int fib(int a,int e){
	int j,c,d;
	c=1;
	if(a<=e) return 1;
	for(j=e;j<=sqrt(a);j++){
		if(a%j==0){
			d=a/j;
			c=c+fib(d,j);
		}
	}
	return c;
}


int num=0;
void yinshu(int x,int y)
{
	if (x==y) num++;
	else if ((x%y==0)&&(x>y)) {yinshu(x/y,y);yinshu(x,y+1);}
	else if (x>y) yinshu(x,y+1);
}
int main()
{
	int n,x;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>x;
	yinshu(x,2);
	cout<<num<<endl;
	num=0;
	}
}


int main()
{
	int nFactor(int n, int border);
	int n;
	cin >> n;
	for (; n >= 1; n--)
	{
		int a;
		cin >> a;
		cout << nFactor(a, a) << endl;
	}
	return 0;
}

int nFactor(int n, int border)
{
	if (n == 1) return 1;
	else
	{
		int i, sum = 0;
		for (i = border; i >= 2; i --)
		{
			if (n % i == 0)
				sum += nFactor(n / i, i);
		}
		return sum;
	}
}


int f(int a,int min)
{
	int result=1,i;
	if(a<min)
		return 0;
	else
	{
		for(i=min;i<=a;i++)
		{
			if(a%i==0)
			{

				result+=f(a/i,i);

			}
		}
		return result;
	}
}
int main()
{
	int n,a,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		printf("%d\n",f(a,2));
	}
	return 0;

}


int sep(int a, int b)
{
	int i;
	int ans = 0;
	if (a == 1)
		ans = 1;
	for (i = b; i <= a; i++)
	{
		if (a%i == 0)
		{
			ans += sep(a / i, i);
		}
	}
	return ans;
}
int baka(int a)
{
	int cirno;
	cirno = sep(a, 2);
	return cirno;
}
int main()
{
	int n, pre;
	int i,j;
	int ans;
	scanf("%d", &n);
	for (i = 1; i <= n; i++)
	{
		scanf("%d", &pre);
		ans = baka(pre);
		printf("%d\n", ans);
	}
}


int f(int m,int k);

int main()
{
	int n,i,k,m;//????n,????m,???k
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>m;
		k=2;
		cout<<f(m,k)<<endl;
	}

	return 0;
}
int f(int m,int k)
{
	int m1,sum=1;
	m1=m;
	while(k<=(int)sqrt(m))
	{
		if(m%k==0)
		{
			m=m/k;

			sum=sum +f(m,k);
		}
		m=m1;
		k++;
	}
	return sum;
}


int fen(int a,int k)
{
	int s=0,j,t=0;
	if(a==1&&a>=k)
	{
		s=1;
	}
	else if(a==k)
	{s=1;}
	else
	{
		for(j=2;j<=a;j++)
		{
			if(a%j==0&&j>=k)
			s=s+fen(a/j,j);
			t=1;
		}
		if(t==0)
		s++;

	}
	return s;
}
int main()
{
	int n,i,q,a;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		cout<<fen(a,1)<<endl;
	}
	cin>>q;
	return 0;
}


int n, m, ans, a[20];

void calc(int dep, int x)
{
	if (x == 1)
	{
		ans++;
		return;
	}
	for (int i = a[dep-1]; i <= x; i++)
		if (!(x % i))
		{
			a[dep] = i;
			calc(dep + 1, x / i);
		}
}

int main()
{
	scanf("%d", &n);
	for (a[0] = 2;n; n--)
	{
		scanf("%d", &m);
		ans = 0;
		calc(1, m);
		printf("%d\n", ans);
	}
	return 0;
}


int num,t,yin[50];
void dd(int n, int a,int d ,int m)
{
	int i;
	if(d==m)
	{
		t++;
		return;
	}
	for(i=a;i<num;i++)
	{
		if(n/yin[i]>=yin[i]&&n%yin[i]==0)
			dd(n/yin[i],i,d+1,m);
	}
}
void q_ys(int n)
{
	int i;
	for(i=2;i<=n;i++)
		if(n%i==0)
		{
			num++;
			yin[num]=i;
		}
	return ;
}
int m_ys(int n)
{
	int i;
	for(i=2;i<=sqrt(n);i++)
	{
		if(n % i==0 )
		{
			return i;
		}
	}
 return 1;
}
void output(int y)
{
	int k=1,i,x;
	x=y;
	t=1,num=0,memset(yin,0,sizeof(yin));
	q_ys(x);
	while(m_ys(x)!=1)
	{
		k++;
		x=x/m_ys(x);
	}
	for(i=2;i<=k;i++)
		dd(y,1,1,i);
	cout<<t<<endl;
}
int main()
{
	int n,i,a[1000];
	t=0,num=0;
	cin>>n;
	for(i=1;i<=n;i++)
		cin>>a[i];
	for(i=1;i<=n;i++)
		output(a[i]);
	return 0;

}


int fac(int p, int q)
{
	int i, t = 1;
	if (p > q)
	{
		return 0;
	}
	if (p == q)
	{
		return 1;
	}
	for (i = p; i <= sqrt(q); i++)
	{
		if (q % i == 0)
		{
			t += fac(i, q / i);
		}
	}
	return t;
}
int main()
{
	int a, i, n;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> a;
		cout << fac(2, a) << endl;
	}
	return 0;
}


int qq(int m){
    int i,j;
    j=0;
    for(i=2;i*i<=j;i++){
     if(m%i==0){
      j=1;
     break;
     }
     }
     return j;
     }

int pp(int m,int j){
   int i,k=0;
   if(m==1)
   return 1;
   else {
   k++;
   for(i=j;i*i<=m;i++){
    if(qq(i)==0&&m%i==0){
     k=k+pp(m/i,i);
     }
     }
   }
  return k;
}

int main(){
    int n,i,p;
    cin>>n;
    int aa[n+1];
    for(i=1;i<=n;i++){
    cin>>p;
    aa[i]=pp(p,2);
}
   for(i=1;i<=n;i++)
   cout<<aa[i]<<endl;

    return 0;
}


int way(int x,int m)
{
	int sum=0,p=0,i;
	for(i=m;i<x;i++)
		if(x%i==0)
		{
			p++;
			sum=sum+way(x/i,i);
		}
		sum=sum+1;
	if(p==0) sum=1;
	if(m>x) sum=0;
	return(sum);
}
int main()
{
	int n,a,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a);
		printf("%d\n",way(a,2));
	}
	return 0;
}


int devide(int n,int k)
{
	int s,i;
	s=1;
	for(i=k;i<=sqrt(n*1.0);i++)
	{
		if(n%i==0)
		{
			s=s+devide(n/i,i);
		}
	}
	return s;
}
int main()
{
	int n,a[200],i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(i==0)printf("%d",devide(a[i],2));
		else printf("\n%d",devide(a[i],2));
	}
	return 0;
}


//
//  main.cpp
//  HomeWork_11.14.Functions
//  ????
//  Created by ??? on 11/19/12.
//  Copyright (c) 2012 airjcy. All rights reserved.
//

//#include <string>

//??n???????????from
int num;
void divide(int n,int from)
{

    int i;
    for (i = from; i < n; i ++) {
        if (n % i == 0) {
            if (n / i < i) {
                return;
            }
            num ++;
            divide(n / i, i);
        }

    }
}

// 20    2 10   2 2 5     4 5    5 4
int main(int argc, const char * argv[])
{

    int n;
    cin >> n;
    int i;
    int numberToDivide;
    for (i = 0; i < n; i++)
    {
        cin >> numberToDivide;
        num = 0;
        divide(numberToDivide, 2);
        cout << num + 1 << endl;
    }

//    num =0;
//    divide(20, 2);
//    cout << num + 1;
}


int ispr(int t)
{
    int v=(int)sqrt(t*1.0)+1;
    for(int i=2; i<v; i++)
        if(t%i==0)
            return 0;
    return 1;
}

int sum;
void fun(int n,int i)
{
    if(n==1)
        sum++;
    for (; i<=n; i++)
    {
        if(n%i==0)
            fun(n/i,i);
    }
    return ;
}

int main() {
    int n;
    scanf("%d",&n);
    for (int j=0; j<n; j++)
    {
        int a;
        scanf("%d",&a);
        if(ispr(a)==1)
        {
            printf("1\n");
            continue;
        }

        int res=1;
        for (int i=2; i<=a/2; i++)
        {
            if(a%i==0)
            {
                sum=0;
                fun(a/i,i);
                res=res+sum;
            }

        }
        printf("%d\n",res);
    }

    return 0;
}


int f(int a,int min);
int main()
{
	int n,i,a;
	cin>>n;
	for(i=0;i<n;i++){
		cin>>a;
		printf("%d\n",f(a,2));}
	return 0;
}
int f(int a,int min)
{
	if(a < min){
		return 0;}
	int result = 1;
	for(int i = min;i<a;i++){
		if(a % i == 0){
			result += f(a/i,i);}}
	return result;
}


int fenjie(int x ,int b)
{
	int i,z=0,c;
	for(i=b;i<=x;i++)
	{
		if(x==i)
			z=z+1;
		else if(x%i==0)
		{
			c=x/i;
			z=z+fenjie(c,i);
		}

	}
	return(z);
}
void main()
{
	int n,i,num,a;
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		num=fenjie(a,2);
		printf("%d\n",num);
	}

}


int f(int,int);
int main()
{
	int n,a[32768],i;
	cin>>n;
	for(i=0;i<=n-1;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<=n-1;i++)
	{
		cout<<f(a[i],2)+1<<endl;
	}
	return 0;
}
int f(int a,int p)
{
	int i,sum=0;
	for(i=2;i<=sqrt(a);i++)
	{
		if(((double)a/i==a/i)&&(i>=p))
		{   p=i;
			sum=sum+1+f(a/i,p);
		}
	}
	return sum;
}


int fenjie(int num,int min);
int k=2;
int main(){
     int n,i,jieguo,num;
     scanf("%d",&n);
     for(i=1;i<=n;i++){
          scanf("%d",&num);
         jieguo=fenjie(num,2);
         printf("%d\n",jieguo);
        }
     return 0;
    }

int fenjie(int num,int min){
       int j,jieguo=1;

      if(num<min){
         return 0;
         }

      for(j=min;j<num;j++){

         if(num%j==0){

            jieguo+=fenjie(num/j,j);
           }
        }
      return jieguo;
   }


int divide(int n,int min)//?n?????????????min
{
	int i,method=0;//method??n????
	if(n>=min)
		method++;
	for(i=min;i<n;i++)
	{
		if(!(n%i))
			method+=divide(n/i,i);
	}
	return method;
}
int main()
{
	int number=0,integer;//??????,integer??????
	int i;
	cin>>number;
	for(i=0;i<number;i++)
	{
		cin>>integer;
		cout<<divide(integer,2)<<endl;
	}
	return 0;
}


int ways(int n,int p)
{
	if(n<p) return 0;
	while(n%p!=0) p++;
	if(n==p) return 1;
	return ways(n/p,p)+ways(n,p+1);
}
int main()
{
	int n,m;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>m;
		cout<<ways(m,2)<<endl;
	}
	return 0;
}


int fen(int m,int k)
{
    int i,t=1,n=0;
    for(i=2;i<=m;i++)
    {
    if(m%i==0) n++;
    }
    if(n==1||m==1) return 1;
    else
    for(i=2;i<=m;i++)
    {
        if(m%i==0&&m/i>=i&&i>=k)
        {
            k=i;
            t=t+fen(m/i,k);
        }
    }
    return t;
}
int main()
{
    int fen(int m,int k);
    int n,i,x;
    scanf("%d\n",&n);
    for(i=0;i<n;i++)
    {
         scanf("%d",&x);
         printf("%d\n",fen(x,1));
     }

 }


int f(int c,int t);
void main()
{
	int n,c;
	scanf("%d",&n);
	for(;n>0;n--)
	{
		scanf("%d",&c);
		if(c==1 || c==2)
			printf("1\n");
		else
			printf("%d\n",f(c,2));
	}
	}
int f(int c,int t)
{
	int count=1,i;
	for(i=t;i<c;i++)
	{
		if(c%i==0)
			count+=f(c/i,i);
	}
	if(i==c)	return count;
	else		return 0;
}


void f(int i,int m);
int sum;
int main()
{
      int n,i,m,k;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {               sum=1;
                      scanf("%d",&m);
                      f(2,m);
                      printf("%d\n",sum);

      }
}
      void f(int i ,int m)
      {
           int k,s;
           s=(int)sqrt(m);
           for(k=i;k<=s;k++)
           {
                            if(m%k==0)
                            {
                                      sum++;
                                      f(k,m/k);
                            }

           }

        }


int fenjie(int,int);

int main()
{
	int times,k,num;
	cin>>times;
	for(k=1;k<=times;k++)
	{
		cin>>num;
		cout<< fenjie(num,1)<<endl;
	}

	return 0;
}

int fenjie(int x,int y)
{
	int i,a=1;
	if(x<y) return 0;
	if(x==y) return 1;
	if(x>y)
	{
		if(y==1)
		{
			for(i=y+1;i<=x;i++)
			{
				if(x%i==0) a=a+fenjie(x/i,i);
			}
		}
		else
		{
			for(i=y;i<=x;i++)
			{
				if(x%i==0) a=a+fenjie(x/i,i);
			}
		}
		return a;
	}

}


int num=0;
int sum(int a,int i)
{

	if(a==1)
	{
		num++;
	}
	else
	{
		while(i<=a)
		{
			if(a%i==0)
			{
				sum(a/i,i);
			}
			i++;
		}
	}
	return num;
}
int main()
{
	int a,t,j,i,count;
	cin>>t;
	for(j=0;j<t;j++)
	{
		count=1;
		cin>>a;
		i=2;
		while(i<=(a/2))
		{
			if(a%i==0)
			{
				num=0;
				sum(a/i,i);
				count=count+num;
			}
			i++;
		}
		cout<<count<<endl;
	}

	return 0;
}


int count;

void f(int n, int min) {
int i;
if (n == min) { count++; return;}
if (n % min!=0) { return;}
for (i = min; i <= n; i++)
f(n/min, i);
}

int main() {
int N,i,num,j;
scanf("%d",&num);
for(j=1;j<=num;j++){
count = 0;
scanf("%d",&N);
for (i = 2; i <= N;i++)
f(N, i);
printf("%d\n",count);
}
return 0;
}


int num=1;
int sushu(int n)
{
	int i,sum=0;
	for(i=1;i<=sqrt(n*1.0);i++)
		if(n%i==0)
			sum++;
	if(sum==1)
		return 1;
	else
		return 0;
}
void fenjie(int i,int k)//i???????k??????????? i?sqrt?n???
{
	int mid,j;
	mid=sqrt(k*1.0);
	for(j=i;j<=mid;j++)
	{
		if(sushu(k))
			break;
		else
		{
			if(k%j==0)
			{
				num++;
				fenjie(j,k/j);
			}
		}
	}
}
int main()
{
	int n,i;
	int a[100];
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];
	for(i=0;i<n;i++)
	{
		fenjie(2,a[i]);
		cout<<num<<endl;
		num=1;
	}
	return 0;
}


/*
 * ways.cpp
 *
 *  Created on: 2013-11-24
 *      Author: Mac
 */

int factor(int a, int f)
{
	if(a == f)
		return 1;
	if (a < f)
		return 0;
	if(a%f == 0)
		return factor(a, f+1) + factor(a/f, f);
	else return factor(a, f+1);
}

int main()
{
	int x, a;
	cin >> x;
	while(x > 0)
	{
		cin >> a;
		cout << factor(a, 2) << endl;
		x --;
	}
}


int main()
{
int n,i,a,factor(int N,int min);
scanf("%d",&n);
for(i=0;i<n;i++)
{
	scanf("%d",&a);
    printf("%d\n",factor(a,2));
}

return 0;
}
int factor(int N,int min)
{
	int i,result;
	result=1;

    if(N<min)
	{
		return 0;
	}
	for(i=min;i<N;i++)
	{
		if(N%i==0)
		{
	      result+=factor(N/i,i);
		}

	}return result;
}


void main()
{
	int f(int m,int i);
    int n,a,b,i;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {scanf("%d",&a);
    	b=f(a,2);
    printf("%d\n",b);}
}
int f(int m,int i)
{	int s,j;
	if(m<i)  s=0;
	else
		{if(m<i*i) s=1;
		else
			{for(s=1,j=i;j<=m;j++)
				{if(m%j==0)
					s=s+f(m/j,j);
				}
			}
		}
	return(s);
}


int col(int a,int b);
int main()
{int n,i,m,l;
scanf("%d",&n);
for(i=1;i<=n;i++)
   {scanf("%d",&m);
   l=col(m,2)+1;
   printf("%d\n",l);
   }
   return 0;
}
int col(int a,int b)
{int i,t,tt=0,sig=0;
for(i=b;(i<a/2)&&((a/i)>=i);i++)
  {
	if(a%i==0)
    {t=a/i;
     tt=tt+1+col(t,i);
     sig=1;
    }
  }
if(sig==0)
  tt=0;
 return(tt);
}


/*
 *  1000012850_34.1.cpp
 *  ????????????a??????????????? ?????????
 *  Created on: 2010-11-27
 *      Author: william
 */
int resolution_into_factors(int j,int i)
{
	int m, sum=0, k=0;
	for(m=j ;m<=sqrt(i); m++)
	{
		if(i%m==0)
		{
            sum=resolution_into_factors(m, i/m)+sum+1;
			k++;
		}
	}
	if(k==0) return 0;
    return sum;
}
int main()
{
    int n, k, i;
    cin>>n;
    for(k=1; k<=n; k++)
    {
    	cin>>i;
    	cout<<resolution_into_factors(2,i)+1<<endl;
    }
    return 0;
}


int wtf(int p,int a);
int main()
{
int n,i,a,p;
scanf("%d",&n);
for(i=0;i<n;i++)
{
  scanf("%d",&a);
  printf("%d\n",wtf(2,a));
}
return 0;
}

int wtf(int p,int a)
{
    int i,ways=0,j=0;
    int m=(int)sqrt(a);
    for(;p<=m;p++)
        {if(a%p==0 && a>=p*p )    {ways=ways+wtf(p,a/p);j++;}}
    if(j==0)
    return 1;
    else
    return ways+1;
}


int f(int a,int b)
{
	int i,p,q;
	for(i=b,p=0;i<=sqrt(a);i++)
	{
        if(a%i==0)
		{
			q=f(a/i,i);
			p=p+q;
		}
	}
	p++;
	return(p);
}
void main()
{
	int i,a,n,k;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a);
		k=f(a,2);
		printf("%d\n",k);
	}

}


int reek(int i,int j)
{
	int k,g=0;
	for (k=j;k<i;k++)
	{
		if ((i%k==0)&&(k!=1))
		{
			g=1;
			break;
		}
		else continue;
	}
	if (g==0) return 1;
	else
	{
		int num=1;
		for(k=j;k<=sqrt(i);k++)
		{
			if ((i%k==0)&&(k!=1))
				num+=reek(i/k,k);
			else continue;
		}
		return num;
	}
}
int main()
{
	int n,i,a[1000];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[n];
		cout<<reek(a[n],1)<<endl;
	}
	return 0;
}


int cc;//cc¾íêÇò»12?Ä·Ö½a?Ä·½·¨ÖÖêy
void fen(int x,int h);
int main()
{
	int n=0,k=0;
	  cin>>n;
	  for(k=1;k<=n;k++)
	  {
			cc=0;
			int ff;
			cin>>ff;
			fen(ff,2);
			cout<<cc<<endl;
	  }
	return 0;
}
void fen(int x,int h)
{
	for(int i=2;i<=x;i++)
	  {
	        if((x%i==0)&&(i>=h)&&(i<x))
			    fen(x/i,i);
		    if((x%i==0)&&(i>=h)&&(i==x))
			    cc++;
	  }
}


int main()
{
    int a[10000],b[10000],p,q,m,n,i,j;
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     scanf("\n%d",&a[i]);
                     }
    for(i=0;i<n;i++){
                     printf("%d\n",ans(a[i],2));
                     }
    return 0;
}

int ans(int sum,int min)
{
    int w,x,u=1;
    for(w=min;w<sum/2;w++){
                         x=sum%w;
                         if(x==0){
                                  if(w<=sum/w)
                                  u+=ans(sum/w,w);
                                  }
                         }
    return u;
}


int numcheck(int num,int a)//???????num??????????a??????
{
	int i=0,sum=0;
	if(num==1)//??1????????
		return 1;
	else if(num<a)
		return 0;
	else
	{
		for(i=a;i<=num;i++)//?????????????????
		{
			if(num%i==0)
				sum=sum+numcheck(num/i,i);
		}
	}
	return sum;
}
int main()
{
	int n=0,i=0,num=0,sum=0;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>num;
		sum=numcheck(num,2);
		cout<<sum<<endl;
	}
	return 0;
}


int counts = 1;
int ty(int, int);
int main()
{
	int i, m, n, c;
	cin >> m;
	for(i = 1 ; i <= m ; i++)
	{
		cin >> n;
		counts = 1;
		c = ty(n, 2);
		cout << c << endl;
	}
	return 0;
}

int ty(int n, int j)
{
	int i, flag = 0;
	if(n == 1)
	{
		return 0;
	}
	if(n == 2)
	{
		return 1;
	}
	for(i = j ; i <= (int)sqrt(n) ; i++)
	{
		if(n % i == 0)
		{
			counts++;
			ty(n / i, i);
		}
	}
	return counts;
}


int i=0;
int f(int n,int m)
{int k=0;
if(m==1)
i++;
else
{for(k=n;k<=m;k++)
   {if(m%k==0)
    {n=k;
     f(n,m/n);}}}
return(i);}
int main()
{
 int n,b,c;
 cin>>n;
 int a;
 for(b=0;b<n;b++)
   {cin>>a;
    c=f(2,a);
    cout<<c<<endl;
    i=0;}
 return 0;
}


int f(int m,int min);
int main()
{
	int n,m,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m);
		printf("%d\n",f(m,2));
	}
	return 0;
}
int f(int m,int min)
{
	int count=1,i;
	if(m==1)
		return 1;
	else if(m == 2)
		return 1;
	else
	{
		for(i=min;i<=sqrt(m);i++)
		{
			if(m%i==0)
			{
				count += f(m/i,i);
			}
		}
		return count;
	}
}


int sdw(int a,int b)
{
    int i;
    int m=1;
    for(i=a;i<b/2;i++)
    {
                      if(b%i==0)
                      {
                                if(i<=b/i)
                                m=sdw(i,b/i)+m;
                      }
    }
    return m;
}
int main()
{
    int n,i,p,b;
    int a[1000];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
                    scanf("%d",&a[i]);
    }
    for(i=0;i<n;i++)
    {
                    b=a[i];
                    p=sdw(2,b);
                    printf("%d\n",p);
    }
        return 0;
}


int main()
{
    int n,i,fenjie(int x,int y),*a,re=0,j;//x?????????y???????????
    scanf("%d",&n);
    a=(int*)malloc(n*sizeof(int));
    for(i=0;i<n;i++)
    {
                    scanf("%d",&a[i]);

    }
    for(i=0;i<n;i++)
    {
                   printf("%d\n",fenjie(a[i],2)+1);
    }
    return 0;
}

fenjie(int x,int y)
{
           int i,flag=0,re=0,flag2=0,k=0;
           if(x<y) return 0;
           else if(x==y) return 0;
           else
           {
                for(i=y;i<x;i++)
                {
                                 if(x%i==0) flag2+=1;
                }
                if(flag2==0) return 0;
                else
           {
                   for(i=y;i<=x;i++)
                   {
                                    if(x%i==0)
                                    {
                                               re+=fenjie(x/i,i);
                                               if(x/i>=i) k+=1;
                                    }
                   }
                   re+=k;
                   return(re);
           }
           }
}


/**
* @author ??
* @date 2010-12-1
* @description
* ??????:????
*/
int sum;
void calculate(int, int);

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n;i++)
	{
		int m;
		sum  = 1;
		cin >> m;
		calculate(m, 2);
		cout << sum << endl;
	}
	return 0;
}
void calculate(int m,int begin)
{
	int i;
	int n = sqrt((double)m);
	for ( i = begin; i <= n; i++ )
	{
		if ( m % i == 0)
		{
			sum++;
			calculate(m / i,i);
		}
	}
}


int sum=0,k=2;
int fenjie(int n,int k)
{
  int x,i,sum=0,p=0;
  x=(int)pow(n,0.5);
  for(i=k;i<=x;i++)
   {
     if(n%i==0) {k=i;sum=sum+fenjie(n/i,k);p=1;}
   }
   if(p==0) return 1;
   if(p==1) return sum+1;
  }
 int main()
 {   int m,n,i;
     cin>>m;
     for(i=0;i<=m-1;i++)
      {
        cin>>n;
       cout<<fenjie(n,2)<<endl;
        sum=0;
      }

  return 0;
}


int num = 0;
void check(int m, int n)
{
	for(;m <= n; m++)
	{
		if(n % m == 0)
		{
			if(n / m == 1)
			{
				num++;
				return;
			}
			else
				check(m, n / m);
		}
	}
}
int main()
{
	int n, m;
	cin >> n;
	for(; n; n--)
	{
		cin >> m;
		check(2, m);
		cout << num << endl;
		num = 0;
	}
	return 0;
}


int check(int i, int a)
{
	int means = 1;
	if ( a == 1 )
		return 0;
	if ( a == 2 )
		return 1;
	for ( ; i <= (int)sqrt(a); i++ )
	{
		if ( a % i == 0 )
			means += check(i, a/i);
	}
	return means;
}
int main()
{
	int n, i, a;
	cin >> n;
	for ( i = 1; i <= n; i++ )
	{
		cin >> a;
		cout << check(2, a) << endl;
	}
}


int total,p;
void part(int y){
	int i2,up;
	if (y==1) return;
	up=(int)sqrt(y);
	for (i2=2;i2<=up;i2++){
		if (p<=i2){
		    	if (y%i2==0){
			    	total++;
					p=i2;
				    part(y/i2);
					p=0;
			}
		}
	}
}
int main(){
	int n,i,a;
	scanf("%d",&n);
	for (i=1;i<=n;i++){
		total=0;
		p=0;
		scanf("%d",&a);
		part(a);
		printf("%d\n",total+1);
	}
	return 0;
}


int t,m,n,i,j,k,xx,x1,x2,x,y,s,n0;

void init(int a[],int b[])
{    freopen("tt.in","r",stdin);
     scanf("%d%d",&m,&n);
	 for (i=1;i<=m;i++)

			 scanf("%d",&a[i]);
	 for (i=1;i<=n;i++)

			 scanf("%d",&b[i]);

	 }

void output(int a[],int k)
{
 int i;
	freopen("tt.out","w",stdout);
	for(i=1;i<=k;i++) if (i==1) printf("%d",a[i]); else printf(" %d",a[i]);
}
 void proce(int n,int b)
{
	int i;
	if (n==1) s++;
	else
	for (i=b;i<=n0;i++)
		if (!(n%i)) proce(n/i,i);

}

int main()
{
//freopen("tt.in","r",stdin);
//freopen("tt.out","w",stdout);
	scanf("%d",&n);

	for (i=1; i<=n;i++)
		{
			scanf("%d",&x);
			s=0;
			n0=x;
			proce(x,2);
			printf("%d\n",s);
	     }

return 0;
}


int f(int, int);
int main()
{
	int x, n, i;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> x;
		cout << f(x, 2) << endl;
	}

	return 0;
}

int f(int x, int i)
{
	int ans = 0;
	if (x == 2)
	{
		return 1;
	}
	else
	{
		for (; i <= sqrt(x); i++)
		{
			if (x % i == 0)
			{
				ans = ans + f(x / i, i);
			}
		}
		return ans + 1;
	}
}


/*
 * fenjie.cpp
 *
 *  Created on: 2013-11-24
 *      Author: ??
 */
int num=0;
void fj(int m,int i){
	if(m==1)num++;
	else {
		for (int j=i;j<=m;j++){
			if(m%j==0)fj(m/j,j);
		}
	}
}
int main(){
	int n,m;cin>>n;
	for(int ii=0;ii<n;ii++){
		cin>>m;fj(m,2);
		cout<<num<<endl;
		num=0;
	}
	return 0;
}


int s=0;
void f(int x,int y)
{
	int i,j,k;
	if(x==1)
		s++;
	else
	{
		for(;y<=x;y++)
		{
			if(x%y==0)
			{
				f(x/y,y);
			}
		}
	}
}
int main()
{
	int n,k,q,j;
	scanf("%d",&q);
	for(j=0;j<q;j++)
	{
		scanf("%d",&n);
		f(n,2);
		printf("%d\n",s);
		s=0;
	}
	return 0;
}


int fj(int n,int m)
{
	int i,j,k=0;
	if(n==1) return 1;
	for(i=m;i<=n;i++)
	{
		if(n%i==0)
		k+=fj(n/i,i);
	}
	return k;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	for(;n>0;n--)
	{
		scanf("%d",&i);
		printf("%d",fj(i,2));
		if(n-1) printf("\n");
	}
}


int fenjie(int k, int l);
int main()
{
	int n, i;
	cin >> n;
	for(i = 1; i <= n; i++)
	{
		int a;
		cin >> a;
		cout << fenjie(a, 2) << endl;
	}
	return 0;
}

int fenjie(int k, int l)
{
	int num = 1, d, e;
	if(k < l)
	{
		return 0;
	}
	d = (int) (sqrt((double) k));
	for(e = l; e <= d; e++)
	{
		if(k % e == 0)
		{
			num += fenjie(k / e, e);
		}
	}
	return num;
}


int m=0;
int main()
{
	void count(int a,int b);
	int r,i,k,n;
	scanf("%d",&r);
	for(i=0;i<r;i++)
	{
		scanf("%d",&n);
		for(k=2;k<=sqrt(n);k++)
		{
			if(n%k==0)
			{
				m++;
				count(k,n/k);
			}
		}
		printf("%d\n",m+1);
		m=0;
	}
}

void count(int a,int b)
{
	int j;
	double t=sqrt(b);
	for(j=a;j<=t;j++)
	{
		if(b%j==0)
		{
			m++;
			count(j,b/j);
		}
	}
}


int f(int i,int t)
{
	if(i<t)
	{return 0;}
	int b=1;
	int a;
	for(a=t;a<i;a++)
	{
		if(i%a==0)
		{b=b+f(i/a,a);}
	}
	return b;
}

int main()
{
	int n;
	scanf("%d",&n);
	int i=0;
	int d[100];
	do
	{
		scanf("%d",&d[i]);
		i++;
	}while(i<n);
	i=0;
	do
	{
		printf("%d\n",f(d[i],2));
		i++;
	}while(i<n);
	return 0;
}


int f(int a,int min)
{
	if(a<min)
	{
		return 0;
	}
	int k=1,i;
	for(i=min;i<a;i++)
	{
		if(a%i==0)
		{
			k=k+f(a/i,i);
		}
	}
	return(k);
}

int main()
{
	int f(int a,int min);
	int j,n;
	int a[100],b[100];
	scanf("%d",&n);
	for(j=0;j<n;j++)
		scanf("%d",&a[j]);
	for(j=0;j<n;j++)
	{
		b[j]=f(a[j],2);
		printf("%d\n",b[j]);
	}
	return 0;
}


//
//  main.cpp
//  123
//
//  Created by blues cookie on 12-11-12.
//  Copyright (c) 2012? blues cookie. All rights reserved.
//

int calc(int a,int b)
{
    if(a*a>b) return 1;
    if(b%a==0) return (calc(a,b/a)+calc(a+1,b));
    return calc(a+1,b);
}
int main(int argc, const char * argv[])
{
    int n,a;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a;
        cout<<calc(2,a)<<endl;
    }
    return 0;
}


void factor(int a, int k);
int sum = 0;
int main()
{
	int n, a, i = 0;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> a;
		factor(a, 2);
		cout << sum + 1 << endl;
		sum = 0;
	}
	return 0;
}

void factor(int a, int k)
{
	int b, j;
	b = (int)sqrt((double)a);
	for (j = k; j <= b; j++)
	{
		if (a % j == 0)
		{
			sum++;
			factor(a / j, j);
		}
	}
	j = k;
}


//???2010?12?1?

//???1000010586_???

//???????

int m , num;
int make( int a );
int pan( int a );
int main()
{
	int n , a , i;
	cin >> n;
	for( i = 1 ; i <= n ; i++ )
	{
		cin >> a;
		num = 0;
		m = a;
		cout << make( a ) << endl;
	}
	return 0;
}
int pan( int a )
{
	int n = 0 , i;
    for ( i = 1 ; i <= sqrt( a ) ; i ++ )
	{
		if ( a % i == 0 )
			n++;
	}
    if ( n == 1 )
		return 0;
	else
		return 1;
}
int make( int a )
{
	int i , j , ans;
	ans = sqrt( a );
	if ( pan( a ) == 0 )
	{
		num++;
		return num;
	}
	else
	{
		num++;
		for ( i = m / a ; i <= ans ; i++ )
		{
			if ( i == 1 ) continue;
			if ( a % i == 0 )
			{
				m = a;
			    num = make( a / i );
			}
		}
		if ( i == ans + 1 )
			return num;
	}
	return num;
}


int main()
{
int digui(int p,int q);
int n,i,j;
scanf("%d",&n);
for(i=0;i<n;i++)
{
int a,sum=1;
scanf("%d",&a);
for(j=2;j<a;j++)
{if(j*j>a)
break;
else if(a%j==0)
sum=sum+digui(j,a/j);
}
printf("%d\n",sum);
}
}
int digui(int p,int q)
{
int z=1,d;
if(p==q)
z=1;
else if(p>q)
z=0;
else
for(d=p;d<q;d++)
{if(d*d>q)
break;
else if(q%d==0)
z=z+digui(d,q/d);
}
return(z);
}


int sum=0;
void f(int x,int y)
{
	if(x==1)
		sum++;
	while(y<=x)
	{
		if(x%y==0)
			f(x/y,y);
		y++;
	}
}
int main()
{
	int n,i,a;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		int j=2,num=1;
		while(j<=a/2)
		{
			if(a%j==0)
			{
				sum=0;
				f(a/j,j);
				num+=sum;
			}
			j++;
		}
		printf("\n%d",num);
	}
	return 0;
}


int main ()
{
	int factor(int n,int x);
	int n;
	int i,m;
	int a[100];

	scanf("%d",&m);
	for(i=0;i<m;i++)
	{
		scanf("%d",&n);
		a[i]=factor(n,2);
	}
	for(i=0;i<m;i++)
		printf("%d\n",a[i]);
	return 0;
}

int factor(int n,int x)
{
	int i,f=0;

	if(n==1)
        f=1;
	else
		for(i=x;i<=n;i++)
			if(n%i==0)
				f+=factor(n/i,i);
	return f;
}


int f(int a,int c);
int j,b;
int main()
{
	int i,n,m;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&m);
		printf("%d\n",f(m,2));
	}
	return 0;
}
int f(int a,int c)
{
	int j,b=0;
	for(j=c;j<=sqrt(a);j++)
	{

		if(a%j==0)
		{
			b=b+f(a/j,j);
		}
	}
	return b+1;
}


int sum=0; //??????sum????????
int yueshu[100]={0};
int s=0;

void number(int num,int s)
{
	int i;
	for(i=s;i>=0;i--)
	{
		if(num<yueshu[i])
			continue;
		if(num==yueshu[i])
			sum++;
		else if(num>yueshu[i]&&num%yueshu[i]==0)
			number(num/yueshu[i],i);
	}
}

int main()
{
	int n=0;
	cin>>n;
	int num=0;
	while(cin>>num)
	{
		int i=0,j=0;
		for(i=2;i<=num;i++)
			if(num%i==0)
			{
				yueshu[j]=i;
				j++;
			}
		s=j-1;
		number(num,s);
		cout<<sum<<endl;
		sum=0;
	}
	return 0;
}


int fjys(int x,int y)
{
	if(x<y)
		return 0;
	int i,n=1;
	for(i=y;i<x;i++)
	{
		if(x%i==0)
		{
			n+=fjys(x/i,i);
		}
	}
	return n;
}
int main()
{
	int n,a[100];
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		cout<<fjys(a[i],2)<<endl;
	}
	return 0;
}


int divide(int d,int n)
{
	int sum=0;
	for(int i=d;i<n;i++){
		if (n%i==0&&(n/i)>=i){
			sum=sum+1;
			sum=sum+divide(i,n/i);}}
	return (sum);
}
int main()
{
	int n,num;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>num;
		cout<<divide(2,num)+1<<endl;}
	return 0;
}


int fj(int a, int b);

int main()
{
	int n, i, a;
	cin >> n;
	for(i = 0; i < n; i++)
	{
		cin >> a;
		cout << fj(a, 2) << endl;
	}

	return 0;
}
int fj(int a, int b)
{
	int j, x, sum = 1, f = 0;
	x = sqrt((double) a);
	if((a == 1) || (a == 2) || (a == 3))
		return 1;
	else
	{
	    for(j = b; j <= x; j++)
	    {
		    if(a % j == 0)
			{
			    sum += fj(a / j, j);
				f = 1;
			}
    	}
		if (f == 0)
	        return 1;
		else
			return sum;
	}
}


int k=0;
int y;
int a(int x,int i);
void b(int x,int i);
int main()
{
	int n,i,x,z;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&x);
		y=x;
		printf("%d\n",a(x,2));
	}
	return 0;
}
int a(int x,int i)
{
	k=0;
	b(x,i);
	return k;
}
void b(int x,int i)
{
	for(i=i;i<=x;i++)
	{
		if(x%i==0) b(x/i,i);
	}
	if(x==1) k=k+1;
}


int f(int x,int y)
{
	int a,n=1;
	for(a=y;a<=sqrt(x);a++)
	{
		if(x%a==0)
		{
			n+=f(x/a,a);
		}
	}
	return n;
}
int main()
{
	int m,i;
	scanf("%d",&m);
	int x[m],n[m];
	for(i=0;i<m;i++)
	{
		scanf("%d",&x[i]);
		n[i]=f(x[i],2);
	}
	for(i=0;i<m;i++)
	{
		printf("%d\n",n[i]);
	}
	return 0;
}


int f(int a,int b)
{
	if(a==b)return 1;
	if(b>a)return 0;
	if(a%b!=0)return f(a,b+1);
	if(a%b==0)return f(a,b+1)+f(a/b,b);
}
int main()
{
	int n=0,i=0,x,y;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>x;
		y=2;
		cout<<f(x,y)<<endl;
	}
	return 0;
}


void count(int, int);
int k;

int main()
{
	int n, i, j, m;
	int num;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		k = 0;
		cin >> num;
		m = sqrt(num) + 1;
		for (j = 2; j < m; j++)
			if (num % j == 0)
			{
				k++;
				count(num / j, j);
			}
		cout << k + 1 << endl;
	}
	return 0;
}
void count(int num, int i)
{
	int j;
	int n = sqrt(num);
	for (j = i; j <= n; j++)
	{
		if (num % j == 0)
		{
			k++;
			count((num / j), j);
		}
	}
}


void account (int ,int);
int p;
int main()
{
	int m;
	int n;
	cin>>n;
	while(n>0)
	{
		p=0;
    cin>>m;
account(m,1);
cout<<p<<endl;
n--;
	}
return 0;
}
void account (int m,int i)
{
if(m==1)
    p++;
else for(int j=2;j<=m;j++)
	{
	if((m%j==0)&&(j>=i))
     account(m/j,j);
	}
}


int main()
{
	int ys(int s,int p);
	int n,m,i,t;
	scanf("%d",&n);
    for(i=1;i<=n;i++)
	{
		scanf("%d",&m);
        t=ys(m,2);
		printf("%d\n",t);
	}
    return 0;
}
int ys(int s,int p)
{
	int j,a=1,b;
	for(j=p;j*j<=s;j++)
	{
        if(s%j==0)
		{
			b=s/j;
			a=a+ys(b,j);
		}
	}
	return(a);
}


int calc(int p,int t);

int main()
{
	int  m,n,ans;

	scanf("%d",&m);

	while (m--)
	{
		scanf("%d",&n);
		ans=calc(2,n);
		printf("%d\n",ans);
	}

	return 0;

}

int calc(int p,int t)
{
	int i,a;

	a=1;
	for (i=p;i<=sqrt(t);i++)
		if (t%i==0)
			a=a+calc(i,t/i);
	return a;

}


int main()
{
	int n, t;
	cin >> n;
	for(t = 0;t < n;t++)
	{
		int m;
		cin >> m;
		int f(int a,int min);
		cout << f(m, 2) << endl;
	}
    return 0;
}
int f(int a, int min)
{
	int i = min;
	if(a < min)
	{
		return 0;
	}
	int result = 1;
	while(i < a)
	{
		if(a % i == 0)
		{
			result += f(a / i,i);
		}
		i++;
	}
	return result;
}


int f(int a,int x)
{
	int count=1,i;
	for(i=x;i<a;i++)
		if(a%i==0)
			count+=f(a/i,i);
	if(i==a)
		return count;
	else
		return 0;
}

void main()
{
	int n,a;
	scanf("%d",&n);
	for(;n>0;n--)
	{
		scanf("%d",&a);
		if(a==1||a==2)
			printf("1\n");
		else
			printf("%d\n",f(a,2));
	}
}


int i,n,k;

int work(int p,int n)
{
	if (n==1) k++;
	for (int i=p;i<=n;i++)
		if (n%i==0) work(i,n/i);
}
int main()
{
	int m;
	cin>>m;
	while (m>0)
		{
     cin>>n;
     k=0;
     work(2,n);
					cout<<k<<endl;
					m--;
		}
	return 0;
}


int Factorization(int,int);
int main()
{
    int n=0,num=0;
    cin>>n;
    for(int i=0;i<n;i++)
      {
          cin>>num;
          cout<<Factorization(num,2)+1<<endl;
      }
      return 0;
}

int Factorization(int num,int n)
{
    int count=0;
    for(int i=n;num/i>=i;i++)
       if(num%i==0)
       {
           count++;
           count=count+Factorization(num/i,i);
       }
    return count;
}


int fenjie(int ,int );
int main()
{
	int i,n,t,r,num;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>num;
		r=fenjie(num,2);
		cout<<r<<endl;
	}
	return 0;
}
int fenjie(int num,int min)
{
	int i,j,k,r=0;
	for(i=min;i<=num;i++)
	{
		if(num%i==0)
		{
			r=r+fenjie(num/i,i);
		}
		if(i==num) r++;
	}
	return r;
}


int f(int n,int m)
{
	int sum=1,i;
	if(n<m)
		sum=0;
	else
		if(n==m)
			sum=1;
	else
	{
		for(i=m;i<=n;i++)
			if(n%i==0)
				sum=sum+f(n/i,i);
	}
	return(sum);
}
void main()
{
	int x,j,a[100000];
	scanf("%d",&x);
	for(j=0;j<x;j++)
		scanf("%d",&a[j]);
	for(j=0;j<x;j++)
		printf("%d\n",f(a[j],2));
}


int turn(int a,int b)
{
	int i,k;
	if(a==1) k=1;
	else if(a<b) k=0;
	else
	{
		k=0;
		for(i=b;i<=a;i++)
			if(a%i==0)
				k=k+turn(a/i,i);
	}
	return k;
}
int main()
{
	int n,i,a[1000],t;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		t=turn(a[i],2);
		printf("%d\n",t);
	}
	return 0;
}


int times;
void fenjie(int m,int k)
{
	int i;
	{
		for(i=k;i<=sqrt(m);i++)
		{
			if(m%i==0)
			{
				fenjie(m/i,i);
			}
		}
	}
	times++;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		int m;
		times=0;
		scanf("%d",&m);
		fenjie(m,2);
		printf("%d\n",times);
	}
}


int ways(int, int);
void main()
{
	int ways(int a, int min);
	int n,b;
	scanf("%d",&n);
	while(n-->0)
	{
		scanf("%d",&b);
		printf("%d\n",ways(b,2));
	}
}
int ways(int a, int min)
{
	if(a<min) return 0;
	int sum=0, i;
	for(i=min;i<=sqrt(a*1.0);i++)
	{
		if(a%i == 0)
			sum = sum + ways(a/i, i);
	}
	return sum+1;
}


int main()
{
	int brea(int a,int min);
	int i,n,a;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a);
		printf("%d\n",brea(a,2));
	}
}

int brea(int a,int min)
{
	int result=1;
	int i;
	if(a<min)
		return(0);
	else if(a==min)
		return(1);
	else
	{
	for(i=min;i<a;i++)
	{
		if(a%i==0)
		{
			result=result+brea(a/i,i);
		}
	}
	return(result);
	}
}


int f2(int i,int a)
{
	int c,s=0;
	for(i;i<=a/2;i++)
	{
		if(a%i==0)
		{
			c=a/i;
			if(c>=i)
			{
				s=s+f2(i,c);
			}
		}

	}
	s=s+1;
	return s;
}

int f(int a)
{
	int s=0;

	s=s+f2(2,a);
    return s;
}

int main()
{
	int n,i,a,b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		b=f(a);
		printf("%d\n",b);

	}

	return 0;
}


int Factor(int, int);
int main()
{
	int n, a, i;
	scanf("%d",&n);
	for (i = 1;i <= n;i++)
	{
		scanf("%d",&a);
		printf("%d\n",Factor(a, 2));
	}
	return 0;
}
int Factor(int a,int p)
{
	int i, j, z = 1;
	if (a < p)
		z = 0;
	else
	{
		for (i = p;i <= a;i++)
		{
			if (a % i == 0)
			{
				z += Factor(a / i, i);
			}
		}
	}
	return z;
}


int fenjie(int max,int min)
{
    int num=1,i,k;
    for(i=min;i<max/2;i++)
    {
        k=max%i;
        if(k==0)
        {
            if(i<=max/i)
            num+=fenjie(max/i,i);
        }
    }
    return num;
}
int main()
{
    int a[10000],n,j;
    scanf("%d",&n);
    for(j=0;j<n;j++)
    {
        scanf("\n%d",&a[j]);
    }
    for(j=0;j<n;j++)
    {
        printf("%d\n",fenjie(a[j],2));
    }
    return 0;
}


int sum=0;
void f(int n,int y)
{
	int a=sqrt(n);
	for(int i=y;i<=a;i++)
	{
		if(n%i==0)
		{
			sum++;
			y=i;
			f(n/i,y);
		}
	}
}
int main()
{
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		int num;
		cin>>num;
		sum=0;
		f(num,2);
		cout<<sum+1<<endl;
	}
	return 0;
}


int divmet(int n,int i);
int main()
{
    int n=0;  //?????
    int t=0;  //????
    int sum;  //???????
    cin>>t;
    for(int i=0;i<t;i++)
    {
        sum=0;
        cin>>n;
        for(int j=2;j<=n;j++)
        {
            sum=sum+divmet(n,j);
        }
        cout<<sum<<endl;
    }
    return 0;
}
int divmet(int n,int i)
{
    int num=0;
    if(n%i==0)
    {
        if(n==i)
        {
            return 1;
        }
        for(int j=2;j<=i;j++)
        {
             num=num+divmet(n/i,j);   //??
        }
           return num;
    }

    else
    {
        return 0;
    }
}


int fj(int a,int zs){
	int k,n,z;
	n=0;z=0;
    for(k=zs;k<=sqrt(a);k++){
		if(a%k==0){n=n+fj(a/k,k);
		z=1;}
	}
		if(z==0){return 1;}
		else{return n+1;}
}
int main(){
	int m,i,t;
    scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&t);
		printf("%d\n",fj(t,2));
	}
	return 0;
}


int main()
{
	int fun(int m,int n);
	int n,i,sum;
	scanf("%d",&n);
	int *p;
	p=(int *)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	scanf("%d",&p[i]);
	for(i=0;i<n;i++)
	{
		sum=0;
	sum=fun(p[i],1);
	printf("%d\n",sum);
	}
	free(p);
}
int fun(int m,int n)
{
	int i,sum=1;
	if(n==1)
	{
		for(i=2;i*i<=m;i++)
		{
			if(m%i==0)
			sum=sum+fun(m/i,i);
		}
	}
	else
	{
		for(i=n;i*i<=m;i++)
		{
			if(m%i==0)
			sum=sum+fun(m/i,i);
		}
	}
	return sum;
}


int fenjie(int x,int p);
int N;
int main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	 {scanf("%d",&N);
	  printf("%d\n",fenjie(N,2));
	 }
	return 0;
}
int fenjie(int x,int p)
{
	int f=0;
	if(x==1)
	 return 1;
	else
	 {for(int i=p;i<=x;i++)
	   if(x%i==0)
	    f=f+fenjie(x/i,i);
	 }
	return f;
}


int yinshu(int num,int min);
int main(){
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     int a,result;
                     scanf("%d",&a);
                     result=yinshu(a,2)+1;
                     printf("%d\n",result);
                     }
    return 0;
}

int yinshu(int num,int min){
    int r,x=0;
    if(num<min){
                return 0;
                }
    else{
         for(r=min;r*r<=num;r++){
                         if(num%r==0){
                                      x=x+1+yinshu(num/r,r);
                                      }
                         }
    return x;
}}


/**
* @file homework.cpp
* @author ??
* @date 2010?12?03
* @description
* ??????: 1090 ????
*/
void jisuan(int ,int);
int times, sum, i, n;
int main()
{
	cin >> times;
	for (i=0;i<times;i++)
	{
		sum = 0;
		cin >> n;
		jisuan (n, 2);
		cout << sum << endl;
	}
	return 0;
}
void jisuan(int n, int j)
{
	int i;
	for (i=j;i<=n;i++)
	{
		if (n > 1)
		{
			if (n % i == 0)
			{
				if (n % i != 0 && n > i)
					sum++;
				jisuan (n / i, i);
			}
		}
		if (n == i)
			sum ++;
	}
}


int f(int a,int b);

int main()
{
	int n,c[100],i,a,sum;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&c[i]);
	}

	for(i=1;i<=n;i++)
	{
		a=c[i];
		sum=f(a,2);
		printf("%d\n",sum);
	}
	return 0;
}

int f(int a,int b)
{
	int sum=1;
	int i;
	if(a<b)
		return 0;
	for(i=b;i<a;i++)
	{
		if(a%i!=0)
			continue;
		else
			sum=sum+f(a/i,i);
	}
	return sum;
}


int f(int n,int k){
   if(n<k)return 0;
   int i,s=1;
   for(i=k;i<n;i++){
     if(n%i==0)s+=f(n/i,i);
     }
   return s;
}
int main(){
    int m,n,i,ans,s;
    scanf("%d",&m);
    while(m--){
       scanf("%d",&n);
       printf("%d\n",f(n,2));
       }
    return 0;
}


int divide(int a,int b)
{
    int i,r;
    r=1;
    for(i=b;i<a;i++)
    {
                    if(((a/i)*i)==a&&(a/i)>=i) r=r+divide(a/i,i);
    }
    return r;
}
int main()
{
    int s,p,n,j;
    scanf("%d",&n);
    for(j=0;j<n;j++)
    {
                    scanf("%d",&p);
                    s=divide(p,2);
                    printf("%d\n",s);
    }
}


/*
 * 1.cpp
 *
 *  Created on: 2010-12-1
 *      Author: hanzhe
 */

int min(int a,int b){   //????
	if(a>b)return b;
	else return a;
}
int f(int n,int s){ //???????s?n???????
	int k=0,i;
	if(n==1)return 1;
	else if(s==1)return 0;
	else if(s>n)return f(n,n);
	else {for(i=2;i<=s;i++)
		if(n%i==0)k=k+f(n/i,min(i,s));
	return k;
	}
}
int main(){ //????
	int n,m;
	cin>>n;
	while(n>0){
		cin>>m;
		cout<<f(m,m)<<endl;  //??
		n--;
	}
	return 0;
}  //????


/*
 * 1118-4.cpp
 *
 *  Created on: 2011-11-29
 *      Author: Administrator
 */
int divide(int n,int a){
	int s=0,t=0,i;
	if(n==1) return 1;
	for(i=a;i>1;i--)
		if(n%i==0){
			s+=divide(n/i,i);
			t++;
		}
	if(t==0) return 0;
	return s;
}
int main(){
	int n,k;
	cin>>k;
	while(k>0){
	cin>>n;
	cout<<divide(n,n)<<endl;
	k--;
	}

	return 0;
}


int main()
{
	int f(int,int);
	int n,a;
	cin>>n;
	while(n--)
	{
		cin>>a;
		cout<<f(a,a)<<endl;
	}
	return 0;
}
int f(int m,int k)
{
	int i,sum=0;
	if(m==1) sum=1;
	for(i=m;i>1;i--)
	{
		if(m%i==0&&i<=k)
			sum+=f(m/i,i);}
	return sum;
}


int f(int a,int min)
{
	if(a<min)
	{
		return 0;
	}
	int result=1,i;
	for(i=min;i<a;i++)
	{
		if(a%i==0)
		{
			result+=f(a/i,i);
		}
	}
	return (result);
}
int main()
{
    int n,a[100],b[100],i;
	scanf("%d\n",&n);
    for(i=0;i<n;i++)
	{
		scanf("%d\n",&a[i]);
	}
    for(i=0;i<n;i++)
	{
		b[i]=f(a[i],2);
	}
    for(i=0;i<n;i++)
	{printf("%d\n",b[i]);}
	return 0;
}


int b[40000]={0};
void zhishu(int n)
{
     int i,j;
     for(i=2;i<sqrt(n);i++)
     {
                     for (j=2;j<n/i+1;j++)
                     {
                         b[i*j]=1;
                     }
     }
}
int fenjie(int n,int m)
{
    int s=0,i;
    if (n<m) return 0;
    if (n==m||b[n]==0) return 1;
    for (i=m;i<n;i++)
    {
        if (n%i==0)
        {
                  s=s+fenjie(n/i,i);
        }
    }
    return s+1;
}
int main()
{
    int n,i,max=0,a[1000];
    cin>>n;
    for (i=0;i<n;i++)
    {
        cin>>a[i];
        if (a[i]>max) max=a[i];
    }
    zhishu(max);
    for (i=0;i<n;i++) cout<<fenjie(a[i],2)<<endl;
    return 0;
}


int sum=1 ;
int kk(int a,int b)
{
	int i;
	for(i=b;i>=2;i--)
	    if(a%i==0)
			return a/i;
		return 0;
}
int seperate(int a,int b)
{
	int i;
	for(i=b;i>=2;i--)
	{
		if(a%i==0&&(a/i)<=i)
		{sum++;if((a/i)==2)continue;else seperate(a/i,a/i-1);}
		else if((a%i==0)&&((kk(a/i,i))!=0))
		{
			seperate(a/i,i);
		}

	}
	return sum;
}
int main()
{
	int n,i,m;
	cin>>n;

	for(i=1;i<=n;i++)
	{
		cin>>m;
		cout<<seperate(m,m-1)<<endl;
		sum=1;
	}
	return 0;
}


int main()
{
	int n,i;
	int a,num(int,int);

	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>a;
		cout<<num(2,a)+1<<endl;
	}
	return 0;
}

int num(int m,int n)
{
	int i,count=0;
	int su(int);
	for (i=m;i<=(int)sqrt(n);i++)
		if (n%i==0)
		{
			count++;
			if (su(n/i)!=0)
				count+=num(i,n/i);
		}
	return count;
}

int su(int n)
{
	int i;
	for (i=2;i<n;i++)
		if (n%i==0)
		{
			return 1;
			break;
		}
	if (i==n)
		return 0;
}


int digui(int m,int n,int sum)
{
	int i;
	sum++;
	if(sqrt(m)<n)
		return sum;
	else{
		for(i=n;i<=sqrt(m);i++){
			if(m%i==0)
				sum=digui(m/i,i,sum);
		}
		return sum;
	}
}

void main()
{
	int n,a;
	scanf("%d",&n);
	while(n--){
		scanf("%d",&a);
		printf("%d\n",digui(a,2,0));
	}
}


int minf(int p,int min);
int main(){
	int n,i,k,p,zs[20000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p);
		//for(min=2;min<=(int)sqrt(p);min++){
			//if(p%min==0){
				zs[i]=minf(p,2);
			    //printf("%d\n",minf(p,min));
		//	}
		//}
		zs[i]++;
	}
	for(i=0;i<n-1;i++){
		printf("%d\n",zs[i]);
	}
	printf("%d",zs[n-1]);
	//scanf("%d",&n);
    return 0;
}
int minf(int p, int min){
	int x=0,i;
	i=min;
	for(i;i<=(int)sqrt(p);i++){
		if(p%i==0){
			x+=minf(p/i,i)+1;
		}
	}

	return x;
	}