#include <bits/stdc++.h>
using namespace std;
string s = "abcdefghijklmnopqrstuvwxyz";
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int x, y;
  cin >> x >> y;
  long long int flag = 0;
  if (x != 0 && y == 1) {
    cout << "No" << endl;
    return 0;
  }
  if ((x >= (y - 1)) && y > 0) {
    if (((x - y + 1) % 2) == 0) flag = 1;
  }
  if (flag == 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
