For this Question: There are Q queries and for each query you are given a positive integer N. Find whether N is a perfect square or not. 

Expected Space Complexity: O(1)First line contains an integer Q - the number of queries.
Q lines follow, each line containing a single integer N.

Constraints
1 <= Q <= 10^5
1 <= Ai <= 10^9Print Q lines. Each line should contain either "YES" or "NO".Sample Input 1:
3
1
2
4

Output 
YES
NO
YES

Explanation:
1 and 4 are perfect squares.

Sample Input 2:
2
144
63

Output 
YES
NO

Explanation:
12 * 12 = 144, I have written this Solution Code: import math
def checkperfectsquare(x):
    if (math.ceil(math.sqrt(n)) ==
    math.floor(math.sqrt(n))):
        print("YES")
    else:
        print("NO")
t=int(input())
for _ in range(t):
    n=int(input())
    checkperfectsquare(n), In this Programming Language: Python, Now tell me if this Code is compilable or not?