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