Let $P^k$ be the set of numbers that are $\pm$ a $k$-fold product of primes.
Then unions of these basis sets form a topology on $S = \Bbb{Z}\setminus\{\pm 1, 0\}$ a semigroup which is topological because $\varphi: x \mapsto a x$ maps (in pre-image) $P^k$ to $P^{k - \eta(a)}$ where $\eta(a) = r $ if $a = p_1 \cdots p_r$, $ \ p_i $ prime.
So not only is multiplication continuous but it satisfies the stronger property above.
Base Theorem. If f:X -> Y, B is a base for X and
for all U in B, $f{-1}(U)$ is open, then f is continuous.