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