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