#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

int main() {
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double del = 1.0 / (a * e - b * d);
    double x = (e * c - b * f) * del;
    double y = (-d * c + a * f) * del;
    if (x == -0) x = 0;
    if (y == -0) y = 0;
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}
