use std::io; fn main() { let mut input = String::new(); io::stdin() .read_line(&mut input) .expect("Failed to read line"); let a_values: Vec = input .trim() .split_whitespace() .map(|x| x.parse().expect("Not a number")) .collect(); input.clear(); io::stdin() .read_line(&mut input) .expect("Failed to read line"); let b_values: Vec = input .trim() .split_whitespace() .map(|x| x.parse().expect("Not a number")) .collect(); let (a_x, a_y, a_z) = (a_values[0], a_values[1], a_values[2]); let (b_x, b_y, b_z) = (b_values[0], b_values[1], b_values[2]); let c_x = a_y * b_z - a_z * b_y; let c_y = a_z * b_x - a_x * b_z; let c_z = a_x * b_y - a_y * b_x; println!("{} {} {}", c_x, c_y, c_z); }