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