#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
string trans(int n) {
	string res = "";
	while (n != 0) {
		res += (n % 10) + '0';
		n /= 10;
	}
	reverse(res.begin(), res.end());
	return res;
}
int main() {
	int N;
	while (cin >> N) {
		string s = trans(N*N);
		if(s.size()!=1)s.erase(0, 1);
		int temp = stoi(s);
		if (temp == N) {
			cout << "Yes!" << endl;
		}
		else {
			cout << "No!" << endl;
		}
	}
	
}