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