#include <iostream>
#include <iomanip>
using namespace std;

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

  while( cin >> a >> b >> c >> d >> e >> f ){
    cout << fixed << setprecision(3) << (b*f - c*e) / (b*d - a*e) << " ";
    cout << fixed << setprecision(3) << (c*d - a*f) / (b*d - a*e) << endl;
}  

  return 0;
}