import java.util.Scanner;

public class QuadraticSolver {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter a b c: ");
        double a = sc.nextDouble();
        double b = sc.nextDouble();
        double c = sc.nextDouble();

        double d = b*b - 4*a*c;
        if(d > 0) {
            double r1 = (-b + Math.sqrt(d))/(2*a);
            double r2 = (-b - Math.sqrt(d))/(2*a);
            System.out.println("Two real roots: " + r1 + ", " + r2);
        } else if(d==0) {
            System.out.println("One real root: " + (-b/(2*a)));
        } else {
            double real = -b/(2*a);
            double imag = Math.sqrt(-d)/(2*a);
            System.out.println("Two complex roots: " + real + " + " + imag + "i, " + real + " - " + imag + "i");
        }
    }
}
