import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;
import std.math;

void main()
{
    foreach(s;stdin.byLine())
    {
        alias real T;
        auto m = s.split().map!(to!T)();
        immutable a=m[0], b=m[1], c=m[2], d=m[3], e=m[4], f=m[5];
        T solve(T a, T b, T c, T d, T e, T f)
        {
            return round((c*e-f*b)*1000/(a*e-d*b))/1000+0;
        }
        writefln("%.3f %.3f",solve(a,b,c,d,e,f),solve(b,a,c,e,d,f));
    }
}