import std.stdio;
import std.conv;
import std.algorithm;
import std.string;
import std.file;
 
int main() {
        int[] hs;
        string l;
        while((l = readln()).length >= 2){
                float a, b, c, d, e, f;
                a = to!int(l.split()[0]), b = to!int(l.split()[1]), c = to!int(l.split()[2]);
                d = to!int(l.split()[3]), e = to!int(l.split()[4]), f = to!int(l.split()[5]);
                float x, y;
                x = (c * e - f * b)/(a * e - d * b), y = (c * d - f * a)/(b * d - e * a);
                x = to!float(to!int(x * 1000)) / 1000, y = to!float(to!int(y * 1000)) / 1000;
                printf("%.3f %.3f\n", x, y);
                }
        return 0;
}