#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int co, ori, tmpori;
  cin >> co >> ori;
  if (ori == 0 || (ori == 1 && co > 0))
    cout << "NO";
  else {
    tmpori = co - (ori - 1);
    if (tmpori % 2 != 0 || tmpori < 0)
      cout << "NO";
    else
      cout << "YES";
  }
  return 0;
}
