#include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define int long long #define double long double typedef vector VI; typedef pair pii; typedef vector VP; typedef vector VS; typedef priority_queue PQ; templatebool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } templatebool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define fore(i,a) for(auto &i:a) #define REP(i,n) for(int i=0;i, greater > q2; signed main() { cin.tie(0); ios::sync_with_stdio(false); mapmp; eFOR(i, 1, 1000)mp[i*i] = 1; int N, Z; cin >> N >> Z; if (N >= 3) { cout << "No" << endl; return 0; } else if (N == 2) { eFOR(i, 1, Z)if (mp[i*i] && mp[Z*Z - i * i]) { cout << "Yes" << endl; return 0; } } else { cout << "Yes" << endl; return 0; } cout << "No" << endl; return 0; }