#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;


double a,b,c,d,e,f;
double x,y;//x,y座標
int main(){
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) !=EOF){
    

      x =(c*e-f*b)/(a*e-b*d);
      y =(c -a*x)/b;

    if(y > 0){
      y =floor((y+0.0005)*1000)/1000;
    }
    if(y < 0){
      y =-floor((fabs(y)+0.0005)*1000)/1000;
    }
    if(x > 0){//小数第4位を四捨五入
      x =floor((x+0.0005)*1000)/1000;
    }
    if(x <0){
      x =-floor((fabs(x)+0.0005)*1000)/1000;
    }
    printf("%.3f %.3f\n",x,y);
  }
  return 0;
}