#include <cmath>
#include <cstdio>

using namespace std;

double det(int a, int b, int c, int d) {
  return a * d - b * c;
}

int main() {
  int a, b, c, d, e, f;
  while (scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) == 6) {
    double x = det(c, b, f, e) / det(a, b, d, e),
           y = det(a, c, d, f) / det(a, b, d, e);
    if (x <= 0.0 && x >= -0.0009) x = 0.0;
    if (y <= 0.0 && y >= -0.0009) y = 0.0;
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}