from numpy.linalg import solve a, b, c, d, e, f = map(int, input().split()) left = [[a, b], [d, e]] right = [c, f] print(*solve(left, right)[::-1])