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