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