#include<bits/stdc++.h>
using namespace std;
int main() {
long long y,t,x;
cin>>y>>t;
x=pow(y, t);
if(x%2==1&&x<0){
cout<<"YES\nYES";
}else
if(x%2==1&&x>=0){
cout<<"NO\nYES";
}else
if(x%2==0&&x<0){
cout<<"YES\nNO";
}else
if(x%2==0&&x>=0){
cout<<"NO\nNO";
};
return 0;
}