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