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.abs(a + 1 - b) io.write(c)