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

int main(){
	int n;
	cin>>n;
	int x=sqrt(n);
	if(x*x==n){
		cout<<"Y";
	}else{
		cout<<"N";
	}
}
/**************************************************************
	Problem: 1685
	User: zhanghanbin
	Language: C++
	Result: Wrong Answer
****************************************************************/