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