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