#include <bits/stdc++.h>
using namespace std;
long long inf = 1e18;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int x, y;
  cin >> x >> y;
  if (y == 0) {
    cout << "no";
    return 0;
  }
  if (y == 1 && x != 0) {
    cout << "no";
    return 0;
  }
  --y;
  x -= y;
  if (x < 0)
    cout << "NO";
  else if (x % 2 == 0)
    cout << "YES";
  else
    cout << "NO";
}
