Let $f:X\_1' \times...\times X\_n' \rightarrow Y$, and $g\_1:X\_1 \rightarrow X\_1'$, ..., $g\_n:X\_n \rightarrow X\_n'$ be continuous functions on their respectives metric spaces $X\_1', ..., X\_n', Y, X\_1, ..., X\_n$.

Are the conditions above sufficient to conclude that $f(g\_1(x\_1), ..., g\_n(x\_n))$ is a continuous function $X\_1 \times ... \times X\_n \rightarrow Y$?

If so, how could one prove it? If not, what would be a counterexample?