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

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 = round((e*c-b*f)/det*1000)/1000.0;
    double y = round((-d*c+a*f)/det*1000)/1000.0;
    
    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}