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