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