#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  while (scanf("%d%d", &n, &m) != EOF) {
    int flag = 0;
    if (m == 0) flag = 1;
    if (n > 0 && m == 1) flag = 1;
    if (flag != 1) {
      if ((n - m + 1) % 2 != 0 || (n - m + 1) < 0) flag = 1;
    }
    if (flag == 1)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
