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

void SolveAndShowEquation(double a,double b,double c,double d,double e,double f);
double Roundoff(double x);
int main(){
  double a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    SolveAndShowEquation(a,b,c,d,e,f);
  }
  return 0;
}

void SolveAndShowEquation(double a,double b,double c,double d,double e,double f){
  double x,y,delta;
  delta=a*e-b*d;
  x=(c*e-b*f)/delta;
  y=(a*f-c*d)/delta;
  x=Roundoff(x);
  y=Roundoff(y);
  cout<<fixed<<setprecision(3)<<x<<" "<<setprecision(3)<<y<<endl;
}

double Roundoff(double x){
  if( x<0 ){
    x*=-1;
    x=double(int(x*1000))/1000+((((x*1000)-int(x*1000))*10)>=5?0.001:0);
    x*=-1;
  }else{
    x=double(int(x*1000))/1000+((((x*1000)-int(x*1000))*10)>=5?0.001:0);
  }
  return x;
}