Let $m \in \mathbb{N}$. I want to show that there's a bijection between the sets $$A = \{(q,a) \mid q\in \mathbb{N} \text{ divides }m, \text{ and }a\in \mathbb{Z}/q\mathbb{Z} \text{ is such that }\gcd{(a,q)}= 1\}, \text{ and}$$
$$B = \mathbb{Z}/ m\mathbb{Z}.$$
For example, when $m = 6$,
$A = \{(1,1), (2,1), (3,1), (3,2), (6,1), (6,5)\}$.
I'm having difficulty finding an appropriate map between the two sets.