#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;

int main (int argc, char const* argv[])
{
    int a[3],b[3];
    double x,y;
    
    while(cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]){
        x = (a[2]*b[1] - a[1]*b[2]) / (a[0]*b[1] - a[1]*b[0]);
        y = (a[2] - a[0]*x)/a[1];
        
        x = round(x * 1000)/1000.0;
        y = round(y * 1000)/1000.0;
        
        printf("%.03lf %.03lf\n",x,y);
    }
    
    return 0;
}