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