import std.algorithm;
import std.array;
import std.stdio;
import std.string;

void main(){
    foreach(line; stdin.byLine){
        auto k = line.split.map!("to!int(a)")().array;
        real det = k[0] * k[4] - k[1] * k[3];
        writefln("%.3f %.3f",cast(real)(k[4] * k[2] - k[1] * k[5]) / det, cast(real)(- k[3] * k[2] + k[0] * k[5]) / det);
    }
}