#include <iostream>
#include <iomanip>

int main() {
  float a,b,c,d,e,f;
  float x,y;
  while(std::cin >> a >> b >> c >> d >> e >> f) {
    y = (c - (f * (a / d))) / (b - (e * (a / d)));
    x = (c - (b * y)) / a;
    if(x == 0) {x = 0.000;}
    if(y == 0) {y = 0.000;}
    std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
  }

  return 0;
}