#include<iostream>
using namespace std;

int main(){
  double a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f){
    double x = (e*c - b*f)/(e*a - b*d) + 1e-10;
    double y = (d*c - a*f)/(d*b - a*e) + 1e-10;
    cout << fixed << setprecision(3) << x << " " << y << endl;
  }
} 