#include <bits/stdc++.h>
using namespace std;
bool comp(long long a, long long b) { return (a < b); }
void solve() {
  long long x, y;
  cin >> x >> y;
  int flag = 0;
  if (y == 0) {
    cout << "NO\n";
    return;
  }
  if (y == 1) {
    if (x == 0) {
      cout << "YES\n";
      return;
    } else {
      cout << "NO\n";
      return;
    }
  }
  if (x == y) {
    cout << "NO\n";
    return;
  }
  if (x < y) {
    if (y - x == 1) {
      cout << "YES\n";
      return;
    } else {
      cout << "NO\n";
      return;
    }
  }
  if ((x % 2 == 0 && y % 2 != 0) || (x % 2 != 0 && y % 2 == 0)) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
