#include<stdio.h>
#include<math.h>


static const double EPS = 1e-9;

int main(void){
  double a,b,c,d,e,f;
  double x,y;
  char line[256];



  fgets(line,sizeof(line),stdin);
  sscanf(line,"%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
  
  x=(d*f-b*e)/(a*d-b*c);
  y=(a*f-c*e)/(a*d-b*c);

  if(x>0){
    if((int)(x*10000) % 10>=5){
      x=x+0.001;
    }
  }
  else if(x<0){
    if((int)(x*10000)%10<5)
    x=x-0.001;
  }
  else x=0.000;

  if(y>0){
    if((int)(y*10000) % 10>=5){
      y=y+0.001;
    }
  }
  else if(y<0){
    if((int)(y*10000)%10<5)
    y=y-0.001;
  }
  else y=0.000;

  printf("%.3lf %.3lf\n",x+EPS,y+EPS);

  return 0;
}