A, B = map(int, input().split()) if A < B: print("YES") print("0") else: print("NO") print(A + 1 - B)