#include<stdio.h>
int main(void){
  double a,b,c,d,e,f;
  int x,y,j,i;
  double n[2][1000];
  i=0;j=0;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a, &b, &e, &c, &d, &f)!=EOF){
    if(a*d-b*c!=0){
      //  printf(" %f %f %f %f %f %f %f\n",a,b,e,c,d,f,((d*e-b*f)/(a*d-b*c)));
      x=1000*((d*e-b*f)/(a*d-b*c));
      y=1000*((a*f-c*e)/(a*d-b*c));
      n[0][i]=x/1000;
      n[1][i]=y/1000;
      //printf(" %.3f %.3f %d\n",x,y);
      //printf(" %.3f %.3f %d\n",n[0][i],n[1][i],i);
     i++;}}
 
  while(j<i){
    printf(" %.3lf %.3lf \n",n[0][j],n[1][j]);
    j++;  
}



  return 0;
}