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