#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair int main() { int n, z; cin >> n >> z; if (n >= 3) { cout << "No" << endl; } else if (n == 1) { if (z == 1) { cout << "No" << endl; } else { cout << "Yes" << endl; } } else { rep(i, 1000) { rep(j, 1000) { if (i*i + j * j == z) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; } }