a, b, c = gets.to_s.split.map{|i| i.to_i } if a < 0 a = -a b = -b c = -c end if a == 0 && b == 0 puts c == 0 ? -1 : 0 elsif a == 0 puts 1 printf "%.15f\n", (-c/1.0/b) else d = b ** 2 - 4 * a * c if d < 0 puts 0 elsif d == 0 puts 1 printf "%.15f\n", (-b/2.0/a) # ans = Rational( -b, 2 * a) # puts "1 #{ans.to_f}" else if b > 0 ans1 = (-b - d ** 0.5) / ( 2.0 * a ) ans2 = ( c * ans1 ) / a else ans2 = (-b + d ** 0.5) / ( 2.0 * a ) ans1 = ( c * ans2 ) / a end # ans1 = (ans1 * 10**14).round / (1.0*(10**14)) # ans2 = (ans2 * 10**14).round / (1.0*(10**14)) # ans1, ans2 = ans2, ans1 if a < 0 puts 2 printf "%.20f\n", ans1 printf "%.20f\n", ans2 # puts "2 #{ans1.to_f} #{ans2.to_f}" end end