fn main() { let eq = input_line::(); let (a, b, c) = (eq[0], eq[1], eq[2]); let (d, e, f) = (eq[3], eq[4], eq[5]); let a_inv = a * e - b * d; println!( "{} {}", (e * c + (-b) * f) / a_inv, ((-d) * c + a * f) / a_inv ); } fn input_line() -> 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() }