#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y;
  cin >> x >> y;
  int copies = y - 1;
  if (y > 0 && copies > 0 && copies <= x && (x - copies) > 0 &&
      (x - copies) % 2 == 0) {
    cout << "YES";
    return 0;
  }
  if (y > 0 && copies == x) {
    cout << "YES";
    return 0;
  }
  cout << "NO";
  return 0;
}
