A, B = map(int,input().split()) c = A+1-B print('NO') if c>0 else print('YES') print(c if c>=0 else -c)