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