#include <stdio.h>
 
double xxx(double a, double b, double c, double d, double e, double f){
 
if(b!=1.000){
a=a/b;
c=c/b;
b=1.000;
}
 
a=a*e;
b=b*e;
c=c*e;
 
a=a-d;
b=b-e;
c=c-f;
 
return c/a;
 
}
 
double yyy(double a, double b, double c, double d, double e, double f){
 
if(a!=1.000){
b=b/a;
c=c/a;
a=1.000;
}
 
a=a*d;
b=b*d;
c=c*d;
 
a=a-d;
b=b-e;
c=c-f;
 
return c/b;
 
}
 
 
int main(void){
 
double a, b, c, d, e, f;
 
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)!=-1){
 
printf("%.3f %.3f\n", xxx(a, b, c, d, e, f), yyy(a, b, c, d, e, f));
 
}
 
return 0;
}