a, b, c = io.read("*n", "*n", "*n") d = b * b - 4 * a * c if d < 0 then print("imaginary") elseif d == 0 then print(-b / 2 / a) else f = (-b - math.sqrt(d)) / 2 / a g = (-b + math.sqrt(d)) / 2 / a if g < f then f, g = g, f end print(f .. " " .. g) end