a, b = [int(x) for x in input().split()] print("YES" if b - a >= 1 else "NO") print(abs(a - b + 1))