#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
  double a,b,c,d,e,f;
  while (cin >> a >> b >> c >> d >> e >> f)
 {
      if(a>1000||a<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(b>1000||b<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(c>1000||c<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(d>1000||d<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(e>1000||e<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(f>1000||f<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
    cout<<fixed<<setprecision(3)<<(c*e-b*f)/(a*e-b*d)<<" ";
    cout<<fixed<<setprecision(3)<<(c*d-a*f)/(b*d-a*e);
    cout<<endl;
 }

  return 0;
}