fn main() { let mut nm = String::new(); std::io::stdin().read_line(&mut nm).ok(); let nm: Vec = nm.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let n = nm[0]; let m = nm[1]; if n <= m { println!("1"); } else if n / m == 2 && n % m == 0 { println!("2"); } else { println!("-1"); } }