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