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

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

    y = (c * d - a * f) / (b * d - a * e);
    x = (c - b * y) / a;
    y *= 10000.0;
    if((int)y % 10 > 4) y += 1.0;
    y /= 10000.0;
    x *= 10000.0;
    if((int)x % 10 > 4) x += 1.0;
    x /= 10000.0;
    printf("%.3f %.3f\n", x, y);
}
     
}
