#include using namespace std; typedef long long ll; #define pb push_back #define fi first #define se second typedef pair P; using VP = vector

; using VVP = vector; using VI = vector; using VVI = vector; using VVVI = vector; const int inf = 1e9 + 7; const ll INF = 1LL << 61; const ll mod = 1e9 + 7; template inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll i, j; ll n, z; cin >> n >> z; if (n >= 3) { cout << "No" << endl; return 0; } if (n == 1) { if (z == 1) cout << "No" << endl; else cout << "Yes" << endl; return 0; } for (i = 1; i * i < 1010101; i++) { for (j = 1; j * j < 1010101; j++) { if (i * i + j * j == z * z) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; return 0; }