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