# my $t = <>; my $t = 1; if($t == 0) { exit; } while ($t--) { my ($a, $b, $c) = split(/ /, <>); if($a == 0) { if($b == 0){ if($c == 0){ print "3\n"; } else { print "0\n"; } } else { printf "%.12f\n", -$c/$b; } } else { my $d = $b * $b - 4 * $a * $c; if($d > 0){ # print "2 "; my $s = sqrt($d); if($a > 0){ printf "%.12f ", (-$b-$s)/(2*$a); printf "%.12f \n", (-$b+$s)/(2*$a); } else { printf "%.12f ", (-$b+$s)/(2*$a); printf "%.12f\n", (-$b-$s)/(2*$a); } } elsif($d == 0){ # print "1 "; printf "%.12f\n", -$b/(2*$a); } else { print "imaginary\n" } } }