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: from math import sqrt

def isPrime(n):
    if (n <= 1):
        return False
    if (n <= 3):
        return True

    if (n % 2 == 0 or n % 3 == 0):
        return False
     
    k= int(sqrt(n))+1
    for i in range(5,k,6):
        if (n % i == 0 or n % (i + 2) == 0):
            return False
 
    return True

def isThreeDisctFactors(n):
    sq = int(sqrt(n))
 
    if (1 * sq * sq != n):
        return False

    if (isPrime(sq)):
        return True
    else:
        return False

N = int(input())
numbers = input().split()

for x in numbers:
    if isThreeDisctFactors(int(x)):    
        print("Yes")
    else:
        print("No"), In this Programming Language: Python, Now tell me if this Code is compilable or not?