#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 ? b-a-1: a+1-b); return 0; }