#include <cmath>
#include <iomanip>
#include <iostream>

using namespace std;
int main() {
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double x = (c * e - b * f) / (a * e - b * d);
    double y = (c * d - a * f) / (b * d - a * e);
    x = floor(x * 10000 + .5) / 10000;
    y = floor(y * 10000 + .5) / 10000;
    cout << fixed << setprecision(3) << x << " " << y << endl;
  }
}