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

double adjust(double d)
{
  if(-0.0005<=d && d<=0.0){
    return 0.0001;
  }else{
    return d;
  }
}

int main(void)
{
  double a,b,c,d,e,f;
  while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
    double det = a*e-b*d;
    double x = (e*c-b*f)/det;
    double y = (-d*c+a*f)/det;  
    printf("%.3f %.3f\n", adjust(x), adjust(y));
  }

  return 0;
}