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