use std::io::{stdin, Read, StdinLock}; use std::str::FromStr; use std::iter::FromIterator; fn main() { let cin = stdin(); let mut scan = Scanner::new(cin.lock()); let ab = arr(3, |_| (scan.read::(), scan.read::())); println!("{}", if ab.iter().all(|&x| x.0 % 2 == 0) {":-)"} else {":-("}); } // region template #[allow(dead_code)] fn iu(i: i64) -> usize { i as usize } #[allow(dead_code)] fn ui(i: usize) -> i64 { i as i64 } #[allow(dead_code, deprecated)] fn join(slice: &[T], sep: &str) -> String { let strings = slice.iter().map(|t| format!("{}", t)).collect::>(); strings.connect(sep) } #[allow(dead_code)] fn arr<'a, S, T>(n: usize, mut f: S) -> Vec where S: FnMut(usize) -> T + 'a { (0..n).map(|i| f(i)).collect::>() } #[allow(dead_code)] fn alt(v: Vec) -> T where T: FromIterator { v.into_iter().collect::() } #[allow(dead_code)] fn dup(v: &[S]) -> T where T: FromIterator, S: Clone { v.iter().cloned().collect::() } struct Scanner<'a> { cin: StdinLock<'a>, } #[allow(dead_code)] impl<'a> Scanner<'a> { fn new(cin: StdinLock<'a>) -> Scanner<'a> { Scanner { cin: cin } } fn read1(&mut self) -> Option { let token = self.cin.by_ref().bytes().map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect::(); token.parse::().ok() } fn read(&mut self) -> T { self.read1().unwrap() } fn readn(&mut self, n: usize) -> Vec { (0..n).map(|_| self.read::()).collect() } fn chars(&mut self) -> Vec { self.read::().chars().collect() } } // endregion