a, b, c, d, e, f = map(int, input().split()) ans = [e*c-b*f,a*f-b*c] D = a*e-b*d ans[0] /= D ans[1] /= D print(*ans)