#include <iostream>
#include <iomanip>
#include <math.h>

int main() {
  float a,b,c,d,e,f;
  float x,y;
  while(std::cin >> a >> b >> c >> d >> e >> f) {

    if(a >= d && fmodf(a, d) == 0) {
      y = (c - (f * (a / d))) / (b - (e * (a / d)));
      x = (c - (b * y)) / a;
    }
    else if(a < d && fmodf(d, a) == 0) {
      y = (f - (c * (d / a))) / (e - (b * (d / a)));
      x = (c - (b * y)) / a;
    }
    else if(b >= e && fmodf(b, e) == 0) {
      x = (c - (f * (b / e))) / (a - (d * (b / e)));
      y = (c - (a * x)) / b;
    }
    else if(b < e && fmodf(e, b) == 0) {
      x = (f - (c * (e / b))) / (d - (a * (e / b)));
      y = (c - (a * x)) / b;
    }
    else {}

    std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
  }

  return 0;
}