#include <iostream>
#include <cstdio>
using namespace std;
int main(){
long long y0 ,t ,y= 1;
cin >> y0 >> t;
if ( t = 0 ){
cout << "NO" <<endl;
cout << "YES" <<endl;
}else {
for ( long long i =1 ;i <=t ;i++){
y = y * y0;
} if ( y < 0 ){
cout << "YES" << endl;
}else cout << "NO" <<endl;
if ( y % 2 == 1){
cout << "YES" <<endl;
}else cout << "NO" << endl;
}
return 0;
}