#include<stdio.h>

int main(void){
  double 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=((double)((c*e-b*f))/(a*e-b*d)*1000)/1000.0;
       y=((double)((d*c-a*f))/(b*d-a*e)*1000)/1000.0;
    if(x==-0.0)x=0.0;
    if(y==-0.0)y=0.0;
    printf("%.3lf %.3lf\n",x,y);
  }
  return 0;
}