#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main(){
    double a , b , c , d , e , f;
    while(cin >> a >> b >> c >> d >> e >> f){
    double t = a;
    a = a*d;
    b = b*d;
    c = c*d;
    d = d*t;
    e = e*t;
    f = f*t;
    double g = b-e;
    double h = c-f;
    double y = h/g;
    double x = (c- b*y) / a ;
    x = x * 1000;
    x = round(x);
    x = x/1000;
    y = y*1000;
    y = round(y);
    y = y/1000;
    printf("%.3lf %.3lf\n" , x  , y );
}
}