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