#include <stdio.h>
main(){
 double x,y,a,b,c,d,e,f;
  while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) !=EOF){
    if(a!=0&&a*e!=0&&c/a-(b*f)/(a*e)!=0&&1-b*d/(a*e)!=0){
      x=(c/a-(b*f)/(a*e))/(1-b*d/(a*e));
      y=(f-d*x)/e;
    }
    else if(a==0){
      y=c/b;
      x=(f-e*y)/d;
    }
    else if(e==0){
      x=f/d;
      y=(c-a*x)/b;
    }
    else{    
      x=(f/d-(e*c)/(b*d))/(1-a*e/(b*d));
      y=(f-d*x)/e;
    }

    printf("%.3f %.3f\n",x,y);
  }
  return 0; 
}