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