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 print(p .. " " .. q .. " " .. r)