A,B =map(int,input().split()) N = B-(A+1) if N < 0: print("NO\n",abs(N),sep="") else: print("YES\n",abs(N),sep="")