#include <iostream>
#include <iomanip>
using namespace std;
  
int main()
{
    double a, b, c, d, e, f;
  
    while (cin >> a >> b >> c >> d >> e >> f)
    {
        b = b * d / a;
        c = c * d / a;
        a = a * d / a;
  
        d = d - a;           // d = 0
        e = e - b;
        f = f - c;
      
        f = f * b / e;
        e = e * b / e;
  
  
        b = b - e;            // b = 0
        c = c - f;
  
        c = c / a;            // x = c
        a = a / a;
  
        f = f / e;            // y = f
        e = e / e;
  
        cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
    }
  
    return 0;
}