#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    while(cin >> n)
    {
        if(n == 0) return 0;
        int OK = 0;
        for(int i = 2; pow(i, 2) <= n; i++)
        {
            int x = pow(i, 2);
            if(n % x == 0)
            {
                OK = 1;
                cout << "Yes" << "\n";
                break;
            }
        }
        if(OK == 0) cout << "No" << "\n";
    }
    return 0;
}