#include <cstdio>

float a,b,c,d,e,f;
int main (){
  scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
  float x,y;
  x=(f*b/e-c)/(d*b/e-a);
  y=(f*a/d-c)/(e*a/d-b);
  x*=1000;
  x+=0.5;
  x=int(x+.5-(x<0)); 
  x/=1000;
  
  y*=1000;
  y+=0.5;
  y=int(y+.5-(y<0)); 
  y/=1000;
  printf("%f %f",x,y);
}