#include <stdio.h>
#include <iostream>
#include <math.h>
#define eps 1e-9
using namespace std;
int main()
{
    double a,b,c,d,e,f,x,y;
    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF)
    {
        x=(b*f-e*c)/(b*d-e*a);
        y=(c-a*x)/b;
        printf("%.3lf %.3lf\n",x+eps,y+eps);
    }
    return 0;
}