#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    int a,b,c,d,e,f;
    float x,y;
    while(scanf("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f))
    {

        int i=a*e-b*d;
        int j=c*e-b*f;
        int k=a*f-c*d;
        x=j/i;
        y=k/i;
        printf("%.3f %.3f", x,y);

    }
    return 0;
}