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