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