Use that [tex]\text{gcd}(a,b,c)=\text{gcd}(\text{gcd}(a,b),c)[/tex], and likewise for [tex]\text{lcm}[/tex]. Also, the fact that [tex]\text{gcd}(a,b)\text{lcm}(a,b)=ab[/tex] might come in handy. You can extract a lot of information from the equation using this, and you do not have to go the way through their respective prime factorizations.