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

int main(){
  double a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f){
    cout << fixed << setprecision(3);

    double x = (c*e-f*b)/(a*e-d*b) + 0;
    double y = (c-a*x)/b + 0;

    cout << x << " " << y << endl;
  }
}
