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

int main(int argc, char** argv)
{
  double a, b, c, d, e, f;
  
  while (fscanf(stdin, "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == 6) {
    double x = (c * e - b * f) / (a * e - b * d);
    double y = (f - d * x) / e;
    
    x = fabs(x) < 0.001 ? 0.0 : x;
    y = fabs(y) < 0.001 ? 0.0 : y;

    fprintf(stdout, "%.3lf %.3lf\n", x, y);
  }
}