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