try:

    while 1:



        a,b,c,d,e,f  = list(map(int,input().split()))

        y = (c * d - f * a) / (d * b - a * e)

        x = (c - b * y) / a



        print(("{:.3f} {:.3f}".format(x, y)))

except Exception:

    pass
def _round(x, d=0):

    p = 10 ** d

    return (x * p * 2 + 1) // 2 / p





try:

    while 1:

        a, b, c, d, e, f = list(map(int, input().split()))

        s = (a * e - b * d)

        x = e * c - b * f

        y = -c * d + a * f



        print(("{:0.3f}".format(_round(x / s, 4)), "{:0.3f}".format(_round(y / s, 4))))

except:

    pass
try:
    while 1:
        a, b, c, d, e, f = list(map(int, input().split()))
        y = (c * d - f * a) / (d * b - a * e)
        x = (c - b * y) / a
        print(("{:.3f} {:.3f}".format(x, y)))
except Exception:
    pass

def _round(x, d=0):
    p = 10**d
    return (x * p * 2 + 1) // 2 / p


try:
    while 1:
        a, b, c, d, e, f = list(map(int, input().split()))
        s = a * e - b * d
        x = e * c - b * f
        y = -c * d + a * f
        print(("{:0.3f}".format(_round(x / s, 4)), "{:0.3f}".format(_round(y / s, 4))))
except:
    pass

+def _round(x, d=0): +    p = 10**d +    return (x * p * 2 + 1) // 2 / p + + -        y = (c * d - f * a) / (d * b - a * e) -        x = (c - b * y) / a -        print(("{:.3f} {:.3f}".format(x, y))) -except Exception: +        s = a * e - b * d +        x = e * c - b * f +        y = -c * d + a * f +        print(("{:0.3f}".format(_round(x / s, 4)), "{:0.3f}".format(_round(y / s, 4)))) +except: