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