A nice number is an integer ending in 3 or 7 when written out in decimal. Prove that every nice number has a prime factor that is also a nice numbers. My teacher just asked me a question like this but i do not know how to start and work it out at all. Can someone help me out with that?

Let $n$ denote a nice number.
Each prime factor of $n$ ends with $1$ or $3$ or $7$ or $9$.
Assume by contradiction that each prime factor of $n$ ends with $1$ or $9$.
Let $m$ denote the number of prime factors which end with $9$.
If $m$ is even then $n$ ends with $1$, since $9^m=9^{2k}=81^k\equiv1\pmod{10}$.
If $m$ is odd then $n$ ends with $9$, since $9^m=9^{2k+1}=81^k\cdot9\equiv9\pmod{10}$.
Hence one of the prime factors of $n$ must end with neither $1$ nor $9$.
Hence one of the prime factors of $n$ must end with either $3$ or $7$.
Hence one of the prime factors of $n$ is nice.
