a,b,c,d,e,f = map(int,input().split()) x = c*e-b*f y = -c*d+a*f x /= a*e-b*d y /= a*e-b*d print(' '.join(map(str,[x,y])))