#include <stdio.h>

//ax + by = c
//dx + ey = d

//y = (af-cd)/(ae-bd)
//x = (c-by)/a

int main(void){
double a,b,c,d,e,f;
while(~scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f))
{
printf("%.3f %.3f\n", (c-b*((a*f-c*d)/(a*e-b*d)))/a, ((a*f-c*d)/(a*e-b*d)));
}
return 0;
}