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