// use std::ops::{Index, IndexMut}; // use std::cmp::{Ordering, min, max}; // use std::collections::{BinaryHeap, BTreeMap}; // use std::collections::btree_map::Entry::{Occupied, Vacant}; // use std::clone::Clone; fn getline() -> String{ let mut res = String::new(); std::io::stdin().read_line(&mut res).ok(); res } macro_rules! readl { ($t: ty) => { { let s = getline(); s.trim().parse::<$t>().unwrap() } }; ($( $t: ty),+ ) => { { let s = getline(); let mut iter = s.trim().split(' '); ($(iter.next().unwrap().parse::<$t>().unwrap(),)*) } }; } macro_rules! readlvec { ($t: ty) => { { let s = getline(); let iter = s.trim().split(' '); iter.map(|x| x.parse().unwrap()).collect::>() } } } macro_rules! mvec { ($v: expr, $s: expr) => { vec![$v; $s] }; ($v: expr, $s: expr, $($t: expr),*) => { vec![mvec!($v, $($t),*); $s] }; } macro_rules! debug { ($x: expr) => { println!("{}: {:?}", stringify!($x), $x) } } fn printiter<'a, T>(v: &'a T) where &'a T: std::iter::IntoIterator, <&'a T as std::iter::IntoIterator>::Item: std::fmt::Display { for (i,e) in v.into_iter().enumerate() { if i != 0 { print!(" "); } print!("{}", e); } println!(""); } fn main() { let (a, b, c) = readl!(i64, i64, i64); let mut ans0 = None; for d in 0..1_000_001 { let calc = |x: i64| x*x*x + a*x*x + b*x + c; if calc(d) == 0 { ans0 = Some(d); break; } if calc(-d) == 0 { ans0 = Some(-d); break; } } let ans0 = ans0.unwrap(); let bb = a + ans0; let cc = b + bb * ans0; // let rt = (bb*bb-4.0*cc).sqrt(); // debug!(bb); debug!(cc); let mut ans = Vec::new(); { let calc = |x: i64| x*x+bb*x+cc; let mut l = -1_000_000_000 as i64-1; let mut r = (-bb)/2; for _ in 0..100 { let m = (l+r)/2; if calc(m) <= 0 { r = m; } else { l = m; } } ans.push(r); } { let calc = |x: i64| x*x+bb*x+cc; let mut l = (-bb+1)/2; let mut r = 1_000_000_000+1; for _ in 0..100 { let m = (l+r)/2; if calc(m) <= 0 { l = m; } else { r = m; } } ans.push(l); } ans.push(ans0); ans.sort(); println!("{} {} {}", ans[0], ans[1], ans[2]); }