fn main() { let mut xx = String::new(); std::io::stdin().read_line(&mut xx).ok(); let xx: Vec = xx.split_whitespace().flat_map(str::parse).collect(); let n = match (xx[0], xx[1]) { (_, 0) => 1, (-1, _) => 2, _ => -1, }; println!("{n}"); }