#include <iostream>
#include <cstdio>
using namespace std;

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

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

  while (cin >> a, cin >> b, cin >> c, cin >> d, cin >> e, cin >> f) {
    printf("%.4f %.4f\n", -(c * e - f * b) / (a * e - d * b), (c * d - f * a) / (b * d - e * a));
  }

  return 0;
}