use proconio::{fastout, input}; #[fastout] fn main() { input! { x: u32, n: usize, m: usize, a: [u32; n], b: [u32; m], } println!("{}", output(solve(x, a, b))) } fn solve(x: u32, a: Vec, b: Vec) -> (bool, bool) { (a.into_iter().any(|a| a == x), b.into_iter().any(|b| b == x)) } fn output(ans: (bool, bool)) -> &'static str { match ans { (true, false) => "MrMax", (false, true) => "MaxValu", (true, true) => "MrMaxValu", (false, false) => "-1", } }