import math

def saidai(x, y):

    x, y = math.fabs(x), math.fabs(y)

    y, x = max(x, y), min(x, y)

    if x == 0:

        return y



    return saidai(x, y % x)



def saisyo(x, y):

    spam = saidai(x, y)

    return spam * (x / spam) * (y / spam)



# a,b,c,d,e,f  = list(map(int,'1 2 3 4 5 6'.split()))

try:

    while 1:



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

        s = saidai(a, d)



        k1 = d / s * -1

        k2 = a / s



        y = (k1*c + k2 * f) / (k1 * b + k2 * e)

        x = (c - b*y) / a

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

except Exception:

    pass
import math

def gcd(x, y):

    x, y = math.fabs(x), math.fabs(y)

    y, x = max(x, y), min(x, y)

    if x == 0:

        return y



    return gcd(x, y % x)



try:

    while 1:



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

        s = gcd(a, d)



        k1 = d / s * -1

        k2 = a / s



        y = (k1*c + k2 * f) / (k1 * b + k2 * e)

        x = (c - b*y) / a

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

except Exception:

    pass
import math


def saidai(x, y):
    x, y = math.fabs(x), math.fabs(y)
    y, x = max(x, y), min(x, y)
    if x == 0:
        return y
    return saidai(x, y % x)


def saisyo(x, y):
    spam = saidai(x, y)
    return spam * (x / spam) * (y / spam)


# a,b,c,d,e,f  = list(map(int,'1 2 3 4 5 6'.split()))
try:
    while 1:
        a, b, c, d, e, f = list(map(int, input().split()))
        s = saidai(a, d)
        k1 = d / s * -1
        k2 = a / s
        y = (k1 * c + k2 * f) / (k1 * b + k2 * e)
        x = (c - b * y) / a
        print(("{:.3f} {:.3f}".format(x, y)))
except Exception:
    pass

import math


def gcd(x, y):
    x, y = math.fabs(x), math.fabs(y)
    y, x = max(x, y), min(x, y)
    if x == 0:
        return y
    return gcd(x, y % x)


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

-def saidai(x, y): +def gcd(x, y): -    return saidai(x, y % x) +    return gcd(x, y % x) -def saisyo(x, y): -    spam = saidai(x, y) -    return spam * (x / spam) * (y / spam) - - -# a,b,c,d,e,f  = list(map(int,'1 2 3 4 5 6'.split())) -        s = saidai(a, d) +        s = gcd(a, d)