import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) a, b, c, d, e, f = mapint() y = (f-d*c/a)/(e-b*d/a) x = (c-b*y)/a print(x, y)