Let $g(n) = 5^k$ where $k$ is the number of distinct primes dividing $n$, and let $h(n) = 0$ if $n$ is divisible by $k^2$ for some integer $k > 1$, and $h(n) = 1$ otherwise.
a) Show that $g(mn) = g(m)g(n)$ does not hold in general, and determine when it holds.
b) Show that $h(mn) = h(m)h(n)$ for all positive integers $m, n$.