#include <iostream>
#include <iomanip>

int main() {
  //int a, b;
  int i;

  double x[6];

  double a, b, c, d, e, f;

  for(;;) {

    std::cin >> a >> b >> c >> d >> e >> f;

    if( std::cin.eof() ) { break; } 

    std::cout 
      << std::fixed
      << std::setprecision(3)
      << ((c*e-b*f)/(a*e-b*d)) 
      << " "
      << ((c*d-a*f)/(b*d-a*e)) 
      << std::endl;

  }
 
  return 0;
}