#include <stdio.h>
#include <math.h>
int main(){
double y, t;
scanf("%lf %lf", &y, &t);
double k = y;
if (t == 0)y = 1;
else {
y = pow(k, t - 1);
}
if (y < 0)
printf("YES\n");
else printf("NO\n");
if (abs(y)%2==0)
printf("NO");
else printf("YES");
return 0;
}