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