a, b = io.read("*n", "*n") --io.write(a) --io.write(b) io.write(a < b and "YES" or "NO") io.write('\n') c = math.max(0, a + 1 - b) io.write(c)