a,b=map(int,input().split()) a+=1 if(a<=b): print("YES") print(b-a) pass; else: print("NO") print(a-b) pass;