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

int main() {
  for(int i = 0; i < 31; i++){
    int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
    double x, y;
    cin >> a >> b >> c >> d >> e >> f;


      if(a == 0 && b == 0 && c == 0 && d == 0 && e == 0 && f == 0){
        break;
      }
      else{
        d * a * x + d * b * y - a * d * x - a * e * y == d * c - a * f;
        (d * b - a * e) * y == d * c - a * f;
        y = (d * c - a * f) / (d * b - a * e);
        double Y = round(y * 1000);
        y = Y / 1000;
        x = (c - b * y) / a;
        double X = round(x * 1000);
        x = X / 1000;
        cout << fixed;
        cout << setprecision(3) << x << " " << setprecision(3) << y << endl;
      }
  }

}

