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('{:.4f} {:.4f}'.format(ans[0],ans[1]))