#include #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = (int)n - 1; i > -1; i--) #define all(x) (x).begin(), (x).end() #define ll long long #define ld long double #define INF 1000000000000000000 typedef pair pll; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, z; cin >> n >> z; if (z == 1) { cout << "No" << endl; } else if (n >= 3) { cout << "No" << endl; } else if (n == 2) { for (int i = 1; i <= 1000; i++) { for (int j = 1; j <= 1000; j++) { if (i * i + j * j == z) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; } else { cout << "Yes" << endl; } }