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