#define _USE_MATH_DEFINES #include using namespace std; //template #define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define ALL(v) (v).begin(),(v).end() typedef long long int ll; const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12; templateinline bool chmax(T& a,T b){if(ainline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} //end int main(){ int n,z; cin>>n>>z; if(n>=3){ puts("No"); return 0; } if(n==1){ if(z==1)puts("No"); else puts("Yes"); } else{ rep(i,1,1001)rep(j,1,1001){ if(i*i+j*j==z*z){ puts("Yes"); return 0; } } puts("No"); } return 0; }