nums = input() a = nums.split(' ') data = [] for n in a: data.append(int(n)) num = data[0] - data[1] if num <= 1: print('Yes') print('0') else: print('No') print(num + 1)