local a, b, c = io.read("*n", "*n", "*n") if a == 0 then if b == 0 then print(c == 0 and -1 or 0) else print(1) print(string.format("%.13f", -c / b)) end else local at, bt, ct = 0LL + a, 0LL + b, 0LL + c local d = bt * bt - 4 * at * ct if d < 0LL then print(0) elseif d == 0LL then print(1) print(string.format("%.13f", -b / (2 * a))) else print(2) if b == 0 then local z = math.sqrt(-c / a) print(string.format("%.13f", -z)) print(string.format("%.13f", z)) else local v = -4 * a * c / b / b if math.abs(v) < 0.00001 then local z = v / 2 - v * v / 8 local v = 1 + z local x = b * (-1 - v) / 2 / a local y = b * z / 2 / a if y < x then x, y = y, x end print(string.format("%.13f", x)) print(string.format("%.13f", y)) elseif math.abs(1 + v) < 0.00001 then local zt = bt * bt - 4LL * at * ct local zstr = tostring(zt):gsub("LL", "") local zn = tonumber(zstr) local diff = math.sqrt(zn) / 2 / a local base = -b / 2 / a local x = base - diff local y = base + diff if y < x then x, y = y, x end print(string.format("%.13f", x)) print(string.format("%.13f", y)) else local x = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a local y = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a if y < x then x, y = y, x end print(string.format("%.13f", x)) print(string.format("%.13f", y)) end end end end