mens, womens = input().split(' ') if mens + 1 <= womens: print('YES') else: print('NO') print(min(womens, mens))