import sys

for line in sys.stdin:

    a, b, c, d, e, f = list(map(int, line.rstrip('\n').split(' ')))

    x = int((e*c - b*f) * 1000 / (a*e - b*d)) / 1000.0

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

    print('%.3f %.3f' % (x, y))
import sys

out=[]

for line in sys.stdin.readlines():

    num = list(map(float, line.strip().split()))

    x = (num[2]*num[4] - num[1]*num[5]) / (num[0]*num[4] - num[1]*num[3])

    y = (num[5]*num[0] - num[2]*num[3]) / (num[0]*num[4] - num[3]*num[1])

    if x == 0:

        x=0.00

    if y == 0:

        y=0.00

    out.append( "%.3f %.3f"%(round(x,3),round(y,3)))

for i in range(len(out)):

    print(out[i])
import sys

for line in sys.stdin:
    a, b, c, d, e, f = list(map(int, line.rstrip("\n").split(" ")))
    x = int((e * c - b * f) * 1000 / (a * e - b * d)) / 1000.0
    y = int((a * f - d * c) * 1000 / (a * e - b * d)) / 1000.0
    print("%.3f %.3f" % (x, y))

import sys

out = []
for line in sys.stdin.readlines():
    num = list(map(float, line.strip().split()))
    x = (num[2] * num[4] - num[1] * num[5]) / (num[0] * num[4] - num[1] * num[3])
    y = (num[5] * num[0] - num[2] * num[3]) / (num[0] * num[4] - num[3] * num[1])
    if x == 0:
        x = 0.00
    if y == 0:
        y = 0.00
    out.append("%.3f %.3f" % (round(x, 3), round(y, 3)))
for i in range(len(out)):
    print(out[i])

-for line in sys.stdin: -    a, b, c, d, e, f = list(map(int, line.rstrip("\n").split(" "))) -    x = int((e * c - b * f) * 1000 / (a * e - b * d)) / 1000.0 -    y = int((a * f - d * c) * 1000 / (a * e - b * d)) / 1000.0 -    print("%.3f %.3f" % (x, y)) +out = [] +for line in sys.stdin.readlines(): +    num = list(map(float, line.strip().split())) +    x = (num[2] * num[4] - num[1] * num[5]) / (num[0] * num[4] - num[1] * num[3]) +    y = (num[5] * num[0] - num[2] * num[3]) / (num[0] * num[4] - num[3] * num[1]) +    if x == 0: +        x = 0.00 +    if y == 0: +        y = 0.00 +    out.append("%.3f %.3f" % (round(x, 3), round(y, 3))) +for i in range(len(out)): +    print(out[i])