#include <bits/stdc++.h>
using namespace std;
int main() {
  int tX, tY;
  cin >> tX >> tY;
  if (tY > tX) {
    if (tY == tX + 1 && tY > 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  } else if (tY < tX) {
    if (tY == 1) {
      if (tX != 0)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else {
      int temp = tY - 1;
      if (temp % 2 == 0 && tX % 2 == 0 && tY > 0)
        cout << "YES" << endl;
      else if (temp % 2 != 0 && tX % 2 != 0 && tY > 0)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  } else
    cout << "NO" << endl;
  return 0;
}
