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