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