Guys, consider
$$
a=b\cdot\frac{n}{d},
$$
where $\gcd(b,d)=1$ and $1\leq b\leq d$, and $1\leq a\leq n$. Does it follow from here that $\gcd(a,n)=n/d$? It’s obvious that $n/d$ is a divisor of both $a$ and $n$. My guess is that if $\gcd(a,n)>n/d$, then we would have a contradiction with $\gcd(b,d)=1$. I know I can prove it the other way around, for if $\gcd(b,d)>1$, then $\gcd(a,n)>n/d$, which is a contradiction.
Say $\gcd(a,n)=k>n/d$. Then we can write $a=b’k$, and we have $b’<b$. But yea, I’m not sure what to do from here on.