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