import math import sys def S(): return sys.stdin.readline().rstrip() def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int, sys.stdin.readline().rstrip().split()) def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) def LS(): return list(sys.stdin.readline().rstrip().split()) a, b, c, d, e, f = MI() x = (c*e-b*f)/(a*e-b*d) y = (a*f-c*d)/(a*e-b*d) print(x, y)