def Main(): a,b=map(int,input().split()) a+=1 if a<=b: print("YES") else: print("NO") print(max(0,a-b)) Main()