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