fn main() { let stdin = std::io::read_to_string(std::io::stdin()).unwrap(); let mut stdin = stdin.split_ascii_whitespace(); let balls: [(u32, u32); 3] = [ ( stdin.next().unwrap().parse().unwrap(), stdin.next().unwrap().parse().unwrap(), ), ( stdin.next().unwrap().parse().unwrap(), stdin.next().unwrap().parse().unwrap(), ), ( stdin.next().unwrap().parse().unwrap(), stdin.next().unwrap().parse().unwrap(), ), ]; println!("{}", output(solve(balls))); } fn solve(balls: [(u32, u32); 3]) -> bool { balls .into_iter() .fold(true, |acc, (a, _)| acc ^ (a & 1 == 1)) } fn output(ans: bool) -> &'static str { match ans { true => ":-)", false => ":-(", } }