import java.util.Scanner; //不知道为什么总出现-0,似乎题目新加了数据 public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); double result; while(scan.hasNextLine()){ String[] data = scan.nextLine().trim().split(" "); double a = Double.parseDouble(data[0]); double b = Double.parseDouble(data[1]); double c = Double.parseDouble(data[2]); double d = b * b - 4 * a * c; if(a == 0){ System.out.println("Not quadratic equation"); }else if(d > 0){ double x1 = ((-b) - Math.sqrt(d)) / (2 * a); double x2 = ((-b) + Math.sqrt(d)) / (2 * a); System.out.printf("x1=%.2f;x2=%.2f%n", x1, x2); }else if(d == 0){ double x = (-b) / (2 * a); if(x==0) { System.out.println("x1=x2=0.00"); }else{ System.out.printf("x1=x2=%.2f%n", x); } }else if(d < 0){ double shi; if(b == 0){ shi = 0; }else{ shi = -b / (2 * a); } double xu = Math.sqrt(-d) / (2 * a); if(xu<0) { System.out.printf("x1=%.2f%.2fi;x2=%.2f+%.2fi%n", shi, xu, shi, Math.abs(xu)); } else{ System.out.printf("x1=%.2f-%.2fi;x2=%.2f+%.2fi%n", shi, xu, shi, xu); } } } } }