For this Question: Andrew is now bored with usual prime numbers and decides to find prime numbers which has exactly three factors. He sits back and keeps on thinking random numbers, and asks you to tell him if the number he has chosen had exactly 3 factors. Now he has given <b>N</b> random numbers,  you need to tell him "<b>Yes</b>" if those numbers had exactly 3 factors otherwise "<b>No</b>".

<b>Note:</b> You can consider the number to be factor of its own.First-line contains N, the number of random numbers he thinks of. Second-line contains the N numbers separated by space.

<b>Constraints:</b>
1 <= N <= 10^5
1 <= numbers <= 10^12Print N lines containing "Yes" or "No".Sample Input 1
3
2 4 6

Sample Output 1
No
Yes
No

Explanation:
2 has 2 factors: 1, 2
4 has 3 factors: 1,2,4
6 has 4 factors: 1,2,3,6

Sample Input 2
3
3 5 7

Sample Output 2
No
No
No, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

#define max1 1000001
 bool a[max1];
signed main()
{
    string s="abcdefghijklmnopqrstuvwxyz";

for(int i=0;i<=1000000;i++){
    a[i]=false;
}
for(int i=2;i<1000000;i++){
    if(a[i]==false){
        for(int j=i+i;j<=1000000;j+=i){
            a[j]=true;
        }
    }
}
int n;
cin>>n;
long long x;
long long y;
for(int i=0;i<n;i++){
    cin>>x;
    long long y=sqrt(x);
    if(y*y==x){
        if(a[y]==false){cout<<"Yes"<<endl;}
        else{cout<<"No"<<endl;}
    }
    else{
        cout<<"No"<<endl;
    }
}}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?