a,b=(int(i) for i in input().split()) x=b-a if(x>0): print("YES") print("0") else: print("NO") print(-(x-1))