Let $s_1 = x + y + z$ and $s_2 = xy + xz + yz.$  Then
\begin{align*}
s_1 s_2 &= (x + y + z)(xy + xz + yz) \\
&= x^2 y + xy^2 + x^2 z + xz^2 + y^2 z + yz^2 + 3xyz \\
&= 12 + 3 \cdot 4 = 24.
\end{align*}Also,
\begin{align*}
s_1^3 &= (x + y + z)^3 \\
&= (x^3 + y^3 + z^3) + 3(x^2 y + xy^2 + x^2 z + xz^2 + y^2 z + yz^2) + 6xyz \\
&= 4 + 3 \cdot 12 + 6 \cdot 4 = 64,
\end{align*}so $s_1 = 4.$  Hence, $s_2 = \frac{24}{s_1} = \boxed{6}.$
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Suppose that $x,$ $y,$ and $z$ satisfy the equations
\begin{align*}
xyz &= 4, \\
x^3 + y^3 + z^3 &= 4, \\
xy^2 + x^2 y + xz^2 + x^2 z + yz^2 + y^2 z &= 12.
\end{align*}Calculate the value of $xy + yz + zx.$
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
6
Suppose that $x,$ $y,$ and $z$ satisfy the equations
\begin{align*}
xyz &= 4, \\
x^3 + y^3 + z^3 &= 4, \\
xy^2 + x^2 y + xz^2 + x^2 z + yz^2 + y^2 z &= 12.
\end{align*}Calculate the value of $xy + yz + zx.$
test