#include <bits/stdc++.h>
using namespace std;

int main()
{
  int a, b, c, d, e, f;
  while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
    float x, y;
    float gy = (a * e) - (b * d);
    swap(a, e);
    b *= -1;
    d *= -1;
    x = (a * c) + (b * f);
    y = (d * c) + (e * f);
    x /= gy;
    y /= gy;
    if (x == 0) x = abs(x);
    if (y == 0) y = abs(y);
    printf("%.3f %.3f\n", x, y);
  }
}

