For this Question: Given an array a of length n, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square. A sequence b is a subsequence of an array a if b can be obtained from a by deleting some (possibly zero) elements.The first line of the input consists of an integer n denoting the length of the array a. The next line consists of n space- separated integers a<sub>1</sub>, a<sub>2</sub>, …, a<sub>n</sub> denoting the elements of the array a.

<b>Constraints</b>
1 &le; n &le; 100
1 &le; a<sub>i</sub> &le; 10<sup>4</sup>If there's a subsequence of a whose product isn't a perfect square, print "Yes". Otherwise, print "No".<b>Sample Input 1</b>
3
1 5 4
<b>Sample Output 1</b>
Yes

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

int main() {

    int t=1;
  //  cin >> t;
    while (t--) {
        int n;
        cin >> n;
        vector<int> a(n);
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }
        bool did = 0;
        for (int x : a) {
            bool f = 0;
            for (int j = 2; j * j <= x; j++)
            if (x % j == 0) {
                int z = 0;
                while (x % j == 0)
                    x /= j, z++;
                if (z % 2 == 1)
                    f = 1;
            }
            if (x != 1 || f) {
                did = 1;
                cout << "Yes\n";
                break;
            }
        }
        if (!did)
            cout << "No\n";
    }
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?