use bigint; sub bs{ ($l,$r,$v)=@_; ($t*$v>=0?$r:$l)=$x while$x=($l+$r)/2,$t=$x**3+$A*$x**2+$B*$x+$C; $x } ($A,$B,$C)=glob<>; $s=sqrt($A**2-3*$B); $p=(-$A-$s)/3; $q=(-$A+$s)/3; if($p==0&&$q==0){$p=-1} print bs(-1e9,$p+1,1),$",bs($p+1,$q+1,-1),$",bs($q+1,1e9,1),$/