#include<stdio.h>#include<math.h>main(){double a,b,c,A,x1,x2,p,q;scanf("%f,%f,%f",&a,&b,&c);A=b*b-4*a*c;if (a==0)printf("该方程不是一元二次方程");else {if (A>0) {x1=(-b+sqrt(b*b-4*a*c)/2*a),x2=(-b-sqrt(b*b-4*a*c)/2*a);printf("%f %f",x1,x2);}else {p=(-b/2*a),q=sqrt(-(b*b-4*a*c)/2*a);printf("%f+%fi",p,q);printf("%f-%fi",p,q);}}return 0;
}
}