For example, let's say you had $a$ and $b$ which are integers and $(a, b) = d$.
Would you write the decompositions for $a$, $b$, and $d$ in terms of the same primes since they have some in common? Or would you first write it for $d$ and then express $a$ and $b$ as multiples of $d$ times some constants, one for $a$ and another for $b$? Just a simple explanation would suffice. Thank you for your time.