a, b, c, d, e, f = list(map(int, input().split())) y = (a*f-c*d)/(a*e-b*d) x = (b*f-e*c)/(b*d-e*a) print(x, y)