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