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: #include <bits/stdc++.h>

using namespace std;

int main() {
    int q;
    cin >> q;
    while (q--) {
        int n;
        cin >> n;
        int x = sqrt(n);
        if (x * x == n) {
            cout << "YES\n";
        } else {
            cout << "NO\n";
        }
    }
    return 0;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?