#include int main() { int a, b; scanf("%d %d", &a, &b); printf("%s\n", a+1<=b ? "YES": "NO"); printf("%d\n", a+1>=b ? a+1-b: 0); return 0; }