while 1:

    try:

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

        matrix = [[a, b, c], [d, e, f]]

        for i in range(2):

            tmp = matrix[i][i]

            for j in range(3):

                matrix[i][j] = matrix[i][j] / tmp

            for j in range(2):

                if i == j:

                    continue

                else:

                    a = matrix[j][i]

                    for k in range(i, 3):

                        matrix[j][k] = matrix[j][k] - a * matrix[i][k]

        print("%.3f %.3f" % (matrix[0][2], matrix[1][2]))

    except:

        break
def gauss(matrix):

    dimension = len(matrix)

    for i in range(dimension):

        tmp = matrix[i][i]

        for j in range(dimension + 1):

            matrix[i][j] /= tmp

        for j in range(dimension):

            if i == j:

                continue

            else:

                tmp2 = matrix[j][i]

                for k in range(i, dimension + 1):

                    matrix[j][k] -= tmp2 * matrix[i][k]

    return list(zip(*matrix))[-1]



while 1:

    try:

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

        matrix = [[a, b, c], [d, e, f]]

        print("%.3f %.3f" % gauss(matrix))

    except:

        break
while 1:
    try:
        a, b, c, d, e, f = list(map(float, input().split()))
        matrix = [[a, b, c], [d, e, f]]
        for i in range(2):
            tmp = matrix[i][i]
            for j in range(3):
                matrix[i][j] = matrix[i][j] / tmp
            for j in range(2):
                if i == j:
                    continue
                else:
                    a = matrix[j][i]
                    for k in range(i, 3):
                        matrix[j][k] = matrix[j][k] - a * matrix[i][k]
        print("%.3f %.3f" % (matrix[0][2], matrix[1][2]))
    except:
        break

def gauss(matrix):
    dimension = len(matrix)
    for i in range(dimension):
        tmp = matrix[i][i]
        for j in range(dimension + 1):
            matrix[i][j] /= tmp
        for j in range(dimension):
            if i == j:
                continue
            else:
                tmp2 = matrix[j][i]
                for k in range(i, dimension + 1):
                    matrix[j][k] -= tmp2 * matrix[i][k]
    return list(zip(*matrix))[-1]


while 1:
    try:
        a, b, c, d, e, f = list(map(float, input().split()))
        matrix = [[a, b, c], [d, e, f]]
        print("%.3f %.3f" % gauss(matrix))
    except:
        break

+def gauss(matrix): +    dimension = len(matrix) +    for i in range(dimension): +        tmp = matrix[i][i] +        for j in range(dimension + 1): +            matrix[i][j] /= tmp +        for j in range(dimension): +            if i == j: +                continue +            else: +                tmp2 = matrix[j][i] +                for k in range(i, dimension + 1): +                    matrix[j][k] -= tmp2 * matrix[i][k] +    return list(zip(*matrix))[-1] + + -        for i in range(2): -            tmp = matrix[i][i] -            for j in range(3): -                matrix[i][j] = matrix[i][j] / tmp -            for j in range(2): -                if i == j: -                    continue -                else: -                    a = matrix[j][i] -                    for k in range(i, 3): -                        matrix[j][k] = matrix[j][k] - a * matrix[i][k] -        print("%.3f %.3f" % (matrix[0][2], matrix[1][2])) +        print("%.3f %.3f" % gauss(matrix))