#include <iostream>
#include <cstdio>
using namespace std;

void Solve(double a,double b,double c,double d,double e,double f){
    double x,y;

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

    if(x==0)x=0.000;
    if(y==0)y=0.000;

    printf("%4.3f %4.3f\n",x,y);
}
int main(){
    double a,b,c,d,e,f;

    cin >> a >> b >> c >> d >> e >> f;

    Solve(a,b,c,d,e,f);
    
    return 0;
}