class Problem0780: def solve(this): a,b = map(int, input().split()) res = a + 1 - b if res <= 0: res = 0 print("YES") else: print("NO") print(res) if __name__ == "__main__": problem = Problem0780() problem.solve()