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

int main(){
  double a, b, c, d, e, f, x, y;
  while(true){
    cin >> a >> b >> c >> d >> e >> f;
    x = (e*c-b*f)/(e*a-b*d);
    y = (d*c-a*f)/(d*b-a*e);
    cout << setprecision(4) << x << " " << y << endl;
  }
  return 0;
}