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