#include int main() { int m,w,remain,i; scanf("%d %d",&m,&w); while(1){ m--; w--; if((m<=0)||(w<=0)){ remain=m+w; break; } } if(remain!=0){ printf("NO\n"); printf("%d\n",remain); }else{ printf("YES\n"); printf("%d\n",remain); } return 0; }