def solve(): a, b = map(int, input().split()) a += 1 print("YES" if a <= b else "NO") print(abs(a - b)) solve()