/* Simultaneous Equation */

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

int main() {
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double bunbo = a * e - b * d;
    double x = (c * e - b * f) / bunbo;
    double y = (a * f - c * d) / bunbo;

    if(x == 0) x = 0.000;
    if(y == 0) y = 0.000;
    printf("%.3lf %.3lf\n", x, y);
  }

  return 0;
}
