#include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>
using namespace std;
int main()
{
 int a,b,c,deta;
 float x1,x2;
 ifstream f; f.open("PT2/test5/PT2.INP",ios::in);
 f>>a>>b>>c;
 cout.setf(ios::fixed);
 cout<<"PHUONG TRINH: "<<a<<"X^2+"<<b<<"X+"<<c<<"=0"<<endl;
 cout<<"KET QUA PHUONG TRINH:"<<endl;
 f.close();
 ofstream f1; f1.open("PT2/test5/PT21.OUT",ios::out);
 if (a==0){
        if (b==0){
                    if (c==0){cout<<"PHUONG TRINH VO SO NGHIEM ";f1<<"YES";}
                    else {cout<<"PHUONG TRINH VO NGHIEM";f1<<"NO";}
                 }
        else {
                   float(x1)=-float(c)/b;
                  cout<<"Nghiem x1= "<<setprecision(2)<<x1;
				  f1<<setprecision(3)<<setiosflags(ios::showpoint)<<x1;
             }
           }
 else
  {
   deta=b*b-4*a*c;
   if (deta>=0){
               x1=float((-b-sqrt(deta))/(2*a));
               x2=float((-b+sqrt(deta))/(2*a));
               cout<<setprecision(2)<<"NGHIEM CUA PHUONG TRINH X1= "<<x1<<" X2="<<x2; f1<<setprecision(3)<<setiosflags(ios::showpoint)<<x1<<" "<<x2;
              }
    else
             {
              
              cout<<setprecision(2)<<"PHUONG TRINH VO NGHIEM";f1<<"NO";
             }

 }
return 0;
}

