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