#include <bits/stdc++.h>
using namespace std;

int main(){
  double a,b,c,d,e,f,answer1,answer2;
  while(cin >> a>>b>>c>>d>>e>>f){
    answer1=(e*c-b*f)/(e*a-b*d);
    answer2=(c*d-a*f)/(d*b-a*e);
    if(answer1==-0.000){
      answer1=0.000;
    }
      if(answer2==-0.000){
      answer1=0.000;
    }
    
    cout << fixed << setprecision(3) << answer1<<" "<<answer2 << endl; 
  }

    return 0;
}
