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