//Simultaneous Equation

#include <iostream>
#include <cstdio>
#include <cassert>
#include <cmath>
#include <cfloat>

namespace {

inline bool is_nearly_zero(double x)
{
  if (abs(x) < DBL_EPSILON)
    return true;
  else
    return false;
}

}

int main()
{
  while (1) {
    double x, y;
    double a, b, c, d, e, f;
    std::cin >> a >> b >> c >> d >> e >> f;
    if (std::cin.fail()) break;

    const double det = (a * e) - (b * d);
    assert(!is_nearly_zero(det));

    const double inv_mat[2][2] = {
    	{e, -b},
    	{-d, a}
    };

    x = ((inv_mat[0][0] * c) + (inv_mat[0][1] * f)) / det;
    y = ((inv_mat[1][0] * c) + (inv_mat[1][1] * f)) / det;

	if (is_nearly_zero(x)) x = 0.0;
	if (is_nearly_zero(y)) y = 0.0;
	
    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}