Suppose $a$ and $b$ are positive integers such that $\gcd(a,b)$ is divisible by exactly $7$ distinct primes and $\mathop{\text{lcm}}[a,b]$ is divisible by exactly $28$ distinct primes.
If $a$ has fewer distinct prime factors than $b$, then $a$ has at most how many distinct prime factors?
I thought that it would be 28, but that does not work. I do not even know were to start. Any ideas or solutions?
Hint: If a prime divides $\gcd(a,b)$, then it divides both $a$ and $b$. There are $7$ of these primes. However, if it divides $\operatorname{lcm}(a,b)$ but not $\gcd(a,b)$, it must divide one of $a$ and $b$, but not both. How many such primes are there, and what ways are there to split them between $a$ and $b$?