#include<iostream>
using namespace std;

main(){
  
  double a,b,c,d,e,f;
  double x, y;
  

  while(cin >> a >> b >> c >> d >> e >> f){
  

    y = (c*d - f*a)/(b*d-e*a);
    x = (b*y - c)/a;
    
    
    x*=1000;
    y*=1000;
    
    // x+=0.5;
    //y+=0.5;
    
    x/=1000;
    y/=1000;
    
    //cout << x << y << endl;
    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}