For this Question: Andrew loves to solve problems related to prime numbers. One of Andrew's friend has asked him to solve below problem for him. 
Given two positive integers <b>N</b> and <b>M</b>, the task is to check that N is the Mth power of a <b>prime number</b> or not.First line of input contains testcases <b>T</b>. For each testcase, there will be two positive integers N and M.

Constraints :
1 <= T <= 100
2 <= N <= 10^6
1 <= M <= 10For each testcase you need to print "<b>Yes</b>" if N is the Mth power of a prime number otherrwise "<b>No</b>". Input :
2
16 4
16 3

Output:
Yes
No

Explanation :
16 is m-th (4th) power of 2, where 2 is prime., I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

const int n = 1000001;

     bool a[n];
int main(){



     for(int i=0;i<n;i++){
        a[i]=false;

     }
     for(int i=2;i<n;i++){
        if(a[i]==false){
            for(int j=i+i;j<n;j+=i){
                a[j]=true;
            }
        }
     }


int t;
cin>>t;
while(t--){
    int x,y;
    cin>>x>>y;
    if(y>1){
        for(int i=2;i<1000;i++){
            if(a[i]==false){
                int s=1;
                for(int j=0;j<y;j++){
                    s*=i;
                }
                if(s==x){
                    cout<<"Yes"<<endl;
                    goto f;
                }
            }
        }
        cout<<"No"<<endl;
        f:;
    }
    else{
        if(a[x]==false){cout<<"Yes"<<endl;}
    else{cout<<"No"<<endl;}
    }
}

}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?