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