use std::io::Read; fn solve(abc: Vec) { let a = abc[0]; let b = abc[1]; let c = abc[2]; if a == 0f64 { if b == 0f64 { if c == 0f64 { println!("{}", -1); } else { println!("{}", 0); } } else { println!("{}", 1); println!("{:.12}", -c / b); } return; } let temp = b * b - 4f64 * a * c; if temp > 0.0 { println!("{}", 2); let base = if b < 0f64 { (-b + temp.powf(0.5f64)) / (2.0f64 * a) } else { (-b - temp.powf(0.5f64)) / (2.0f64 * a) }; let other = c / (a * base); if base < other { println!("{:.12}", base); println!("{:.12}", other); } else { println!("{:.12}", other); println!("{:.12}", base); } } else if temp == 0.0 { println!("{}", 1); println!("{:.12}", -b / (2.0f64 * a)); } else { println!("{}", 0); } } fn main() { let mut abc = String::new(); std::io::stdin().read_to_string(&mut abc).ok(); let abc: Vec = abc.trim().split('\n').next().unwrap().trim().split_whitespace().map(|i| i.parse::().unwrap()).collect(); solve(abc); }