#include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  double a, b, c, d, e, f, x, y, tmp_h, tmp_l;
  while (cin >> a >> b >> c >> d >> e >> f) {
    tmp_h = (b * e) / b, tmp_l = (b * e) / e;
    a *= tmp_h, b *= tmp_h, c *= tmp_h, d *= tmp_l, e *= tmp_l, f *= tmp_l;
    x = (c - f) / (a - d);
    y = (c - a * x) / b;
    if (x == -0) {
      x = 0.0;
    }
    if (y == -0) {
      y = 0.0;
    }
    cout << x << ' ' << y << '\n';
  }
  return 0;
}

