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