#include <bits/stdc++.h>
#define MAX 100
using namespace std;


int main(){
	int n,data[MAX];
	while(cin>>n){
		string s1 = to_string(n);
		int len1 = s1.size();
		int p = pow(n,2);
		string s2 = to_string(p);
		if(s2.substr(s2.size() - len1) == s1 )
			cout<<"Yes!"<<endl;
		else
			cout<<"No!"<<endl;
	}




}