#include <bits/stdc++.h>
using namespace std;
int main() {
  int first, second;
  cin >> second >> first;
  if ((second == 1 && first == 0) || first == 0) {
    cout << "NO";
    return 0;
  } else if (first == 1 && second == 0) {
    cout << "YES";
    return 0;
  }
  int tot = first;
  int co = first - 1;
  if (first == 1 && second >= 0) {
    cout << "NO";
    return 0;
  }
  if ((second - co) % 2 == 0 && (second - co) >= 0)
    cout << "YES";
  else
    cout << "NO";
}
