a, b, c = io.read("*n", "*n", "*n") x, y, z = io.read("*n", "*n", "*n") p = b * z - c * y q = c * x - a * z r = a * y - b * x -- -0 to 0 if p == 0 then p = 0 end if q == 0 then q = 0 end if r == 0 then r = 0 end print(p .. " " .. q .. " " .. r)