// 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); } if calc(-d) == 0 { ans0 = Some(-d); } } let ans0 = ans0.unwrap(); let bb = a as f64 + ans0 as f64; let cc = b as f64 + bb * ans0 as f64; let rt = (bb*bb-4.0*cc).sqrt(); let mut ans = Vec::new(); ans.push(ans0); ans.push(((-bb+rt)/2.0).round() as i64); ans.push(((-bb-rt)/2.0).round() as i64); ans.sort(); println!("{} {} {}", ans[0], ans[1], ans[2]); }