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