A, B = input().split(' ') mens, womens = int(A), int(B) if (mens + 1) <= womens: print('YES') else: print('NO') print(abs(womens - (mens + 1)))