#include<stdio.h>
#include<math.h>
int main()
{
	double a,b,c,dis,p,q;
	printf("please intput a;b;c:");
	scanf("%lf%lf%lf",&a,&b,&c);
	dis=b*b-4*a*c;
	p=-b/(2*a);
	if(a!=0)
	{
	
		if(dis>=0)
		{
			
			q=sqrt(dis)/(2*a); 
			if(dis==0)
				printf("root1=root2=%7.2lf\n",p);
			else
				printf("root1=%7.2lf\root2=%7.2lf\n",p+q,p-q);
			
		}
		else
		{
			dis=-dis; 
			q=sqrt(dis)/(2*a);
			printf("root1=%7.2lf+%7.2lfi\troot2=%7.2lf-%7.2lfi",p,q,p,q);
		}
	}
	else
	  printf("root=%7.2lf\n",-c/b);
	  return 0;
		
}