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