Bijective proof of $ \sigma_0(m) \,\sigma_0(n) = \sum_{r | (m,n)} \sigma_0( mn / r^2) $? From the theory of Hecke operators one learns this formula for the divisor function:
$$ \sigma_0(m) \,\sigma_0(n) = \sum_{r | (m,n)} \sigma_0( mn / r^2) $$
I would like to fine a bijective proof of this result.  Can we find a bijection between?
$$ \big\{  (d_1, d_2): d_1 \big| m, d_2 \big| n \big\}  \longleftrightarrow \left\{ (r,d):  r\,\big|\, (m,n)\,, d \,\Big|\, \frac{m}{r} \cdot \frac{n}{r} \right\}$$
Here is one simple check, but it's not much $ \sigma_0(5) = \sigma_0(3) = 2 $  meanwhile $ (m,n) = 1 $  and $\sigma_0(15) = 3$.  The formula says:
$$ \sigma_0(3) \cdot  \sigma_0(5) =  \sigma_0(15) \hspace{0.25in}\text{ or }\hspace{0.25in} 2 \times 2 = 4$$
This actually kind of proves it in the case $m,n$ are relatively prime.
$$ \{  (1,1), (1,5), (3,1), (3,5)\} \longleftrightarrow \{ (1,1), (1,3), (1,5), (1,15) \}$$
My best guess for the bijection is: $(d_1, d_2) \mapsto \left(\mathrm{gcd}(d_1, d_2), \frac{\mathrm{lcm}(d_1, d_2)}{\mathrm{gcd}(d_1, d_2)} \right) $ but what could be the inverse map?

This is $l=0$ case of the bijection I gave in here: How to prove $T_{m}T_{n}=\sum_{d|\gcd(m,n)}d^{k-1}T_{mn/d^2}?$ $T_{n}$ is Hecke operator.
$$\big\{  (d_1, d_2): d_1 \big| m, d_2 \big| n \big\}  \longleftrightarrow \left\{ (r,d):  r\,\big|\, (m,n)\,, d \,\Big|\, \frac{m}{r} \cdot \frac{n}{r} \right\}$$
The bijection between these sets is 
$$
(1) \ \ \ r=(d_2,\frac m{d_1}), \ \ d=\frac{d_1d_2}{(d_2,\frac m{d_1})}.
$$
Then $r|m$, $r|n$, and
$$
r^2d={d_1d_2}{(d_2,\frac m{d_1})} \Bigg\vert d_1 d_2\frac m{d_1} \Bigg\vert mn.
$$
The inverse of this map (1) is
$$
(2) \ \ \ d_1 = (d,\frac mr), \ \ d_2=\frac{rd}{(d,\frac mr)}.
$$
Then $d_1|m$, $d_2|r\frac nr = n$.
The maps (1) and (2) are inverses of each other because
$$
(\frac{d_1d_2}{(d_2,\frac m{d_1})},\frac m{(d_2,\frac m{d_1})})=d_1, \ \ (\frac{rd}{(d,\frac mr)}, \frac m{(d,\frac mr)} )=r.
$$
