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