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