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


double a,b,c,d,e,f;
double A,B,C,D;
int main(){
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) !=EOF){
    if(a == 0){
      A =c/b;
      B = (f-e*A)/d;
      }
    if(b == 0){
      B = c/a;
      A = (f-d*B)/e;
    }
    if(d == 0){
      A =f/e;
      B = (c-b*A)/a;
    }
    if(e == 0){
      B =f/c;
      A =(c -a*B)/b;
    }
    if( a != 0&& b!=0&& d!=0 &&e!=0){
      b/=a;
      c/=a;
      a/=a;
      
      e/=d;
      f/=d;
      d/=d;
      A =(c-f)/(b-e);
      B =(c-b*A);
    }
    
    A =floor((A+0.0005)*1000)/1000;//小数第4位を四捨五入
    B =floor((B+0.0005)*1000)/1000;
    printf("%.3f %.3f\n",B,A);
  }
  return 0;
}