fn main() { let stdin = std::io::read_to_string(std::io::stdin()).unwrap(); let mut stdin = stdin.split_ascii_whitespace(); let a: u16 = stdin.next().unwrap().parse().unwrap(); let b: u16 = stdin.next().unwrap().parse().unwrap(); println!("{}", output(solve(a, b))); } fn solve(a: u16, b: u16) -> (bool, u16) { (a < b, (a + 1).abs_diff(b)) } fn output(ans: (bool, u16)) -> String { match ans { (true, ans) => String::from("YES\n") + &ans.to_string(), (false, ans) => String::from("NO\n") + &ans.to_string(), } }