fn main() { let (a, b, c): (i32, i32, i32) = { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).unwrap(); let mut iter = buf.split_whitespace(); ( iter.next().unwrap().parse().unwrap(), iter.next().unwrap().parse().unwrap(), iter.next().unwrap().parse().unwrap(), ) }; let d = b * b - 4 * a * c; if d > 0 { let x = (-(b as f64) - (d as f64).sqrt()) / (2.0 * (a as f64)); let y = (-(b as f64) + (d as f64).sqrt()) / (2.0 * (a as f64)); if x < y { println!("{:.10} {:.10}", x, y); } else { println!("{:.10} {:.10}", y, x); } } else if d == 0 { println!( "{:.10}", (-(b as f64) / (2.0 * (a as f64))), ) } else { println!("imaginary"); } }