import std.stdio;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.regex;
import std.typecons;

void main() {
    const EPS = 1e-9;
    int a, b, c, d, e, f;
    while (true) {
        if (stdin.eof) break;
        scanf("%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f);
        double z = 1.0 / (a * e - b * d);
        double x = (e * c - b * f) * z + EPS;
        double y = (-d * c + a * f) * z + EPS;
        writefln("%.3f %.3f", x, y);
    }
    
}