from numpy import matrix,array a,b,c,d,e,f=map(int,input().split()) A=matrix([[a,b],[d,e]]) B=array([[c],[f]]) ans=(A**-1)*B print(float(ans[0]),float(ans[1]))