#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define EPS 1e-12;

int main(void){
  double a,b,c,d,e,f;
  double x,y;

  while(scanf("%lf %lf %lf %lf %lf %lf",&a ,&b ,&c ,&d ,&e ,&f) != EOF){

    x=(c*e-b*f)/(a*e-b*d);
    y=(d*c-a*f)/(b*d-a*e);
    if(abs(x) < EPS) x = 0.000;
    if(abs(y) < EPS) y = 0.000;
    printf("%.3lf %.3lf\n",x,y);
  
  }
  
  return 0;
}