Let $n$ be a positive integer. Prove that there exists a positive integer $m > 1000$ with the following two properties: $m$'s last 3 digits are 007, and $m$ is relatively prime to $n$.
Can somebody provide me with a solution?
I have this so far: We know that having the last three digits of $m$ be $007$ means $m \equiv 7 \mod 1000.$ When $n$ has no factors of $2$ or $5,$ we can make congruences $m \equiv 1\mod p$ where $p$ is a prime that divides $n$. The set of congruences with $m \equiv 7 \mod1000$ give a solution $(m,n)$.
I don't know how to prove it when n is a multiple of 2 or 5. I have searched up this question, the two solutions given used dirichlet's theorem, which I can't use, and the other one didn't explain what I want to know. Thanks in advance.
Hint: If $m \equiv 1 \pmod{n}$, can you say anything about the gcd of $m$ and $n$?
Hint 2: