#include<iostream>
#include<cstdio>

using namespace std;

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

  while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) {
    double x, y;
    double denom = a * e - b *d;
    double nomer_x = c*e - b*f;
    double nomer_y = -c*d + a*f;
    x = nomer_x / denom;
    y = nomer_y / denom;
    int f1 = 0, f2 = 0;
    if((int)x == 0) {
      printf("0.000 ");
      f1 = 1;
    }
    if(f1 == 0) {
      printf("%.3lf ", x);
    }
    if((int)y == 0) {
      printf("0.000\n");
      f2 = 1;
    }
    if(f2 == 0) {
      printf("%.3lf\n", y);
    }
  }

  return 0;
}