Can the knowledge of the inverse of $p$ modulo $q$ help factor $n=pq$? With the RSA algorithm implemented using the Chinese Remainder Theorem (CRT), the private key has to be provided with not only $p$, $q$ and the private exponent $d$, but often also with the pre-computed value $q^{-1} \bmod p$ for a faster recombination using the CRT.

Assuming that $q^{-1} \bmod p$ is leaked to the adversary (but not $d$, $p$ and $q$ themselves), does that help factor $n = pq$? And if so, how?
This question was already answered in this not-so-great titled question.

($p$ and $q$ being "safe primes" does not matter in this context, but $q$ shouldn't be (much) longer than $p$, as the methods works for $q&lt;p$, but can be adapted by "guessing" the top bits of $q$ otherwise).