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