fn read_vec() -> Vec { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() } fn main() { let input:Vec = read_vec(); let result = no1004(input[0], input[1], input[2], input[3]); println!("{} {}", result.0, result.1); } fn no1004(a:usize, b:usize, x0:usize, n:usize) -> (usize, usize) { if x0 % 2 == 0 { (0, n / 2) } else { (n / 2, 0) } }