#2、#6、#7AC,#9、#10TLE,共50分
#include <bits/stdc++.h>
using namespace std;
long long int y,t,a;
int main(){
cin>>y>>t;
a=t;
if(t==0){
y=1;
}else{
for(int i=1;i<=t;i++){
y*=a;
}
}
if(y<0){
cout<<"YES"<<"\n";
}else{
cout<<"NO"<<"\n";
}
if(y%2==1){
cout<<"YES";
}else{
cout<<"NO";
}
return 0;
}