use std::io::*; use std::str::*; fn main() { println!("{} {}",0,0); let mut x:i32 = read(); if x == 0{return;}else{ println!("{} {}",0,x); let mut y:i32 = read(); if y == 0{return;}else{ println!("{} {}",y/2,x-y/2); } } } fn read() -> T { let stdin = stdin(); let stdin = stdin.lock(); let s = stdin.bytes().map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect::(); s.parse::().unwrap_or_else(|_| panic!("Faild to parse {}", s)) }