I have a function,

$\displaystyle f:= \left\{ \begin{array}{lr}

(g(x, y, z), h(x, y, z)) & x \neq 0 \text{ or } y \neq 0 \\

(0, 0) & x=y=0

\end{array}

\right.

$

and I want to show that it is smooth. I know $\displaystyle g$ and $\displaystyle h$ are smooth. Does this imply that $\displaystyle f$ is smooth? If so, why?