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