The least prime factor (lpf) of a natural number is the smallest prime number that divides that number. In particular the least prime factor of any even number equals $2$ and the least prime factor of a prime number is itself. But a less trivial fact about least prime factors is that the least prime factor of $n^i$ equals $n$, for a prime number $n$ and a non zero positive integer $i$, that is,
$$\mathsf{lpf} (n^i) = n, \qquad \text{for } i > 0.$$
This can be proven by induction on $i$: the base case is trivial because $n$ is prime; for the inductive case, we can use the fact that $\mathsf{lpf} (n^{i+1})$ divides $n^{i+1}$ and a lemma that implies that if any natural number $m$ divides $n^{i+1}$ then there exists a zero positive integer $j$ such that $j \le i +1 $ and $m = n^j$.
However, now I wish to prove a slightly more general theorem, namely that given two prime numbers $n$ and $m$ such that $n < m$ we have
$$\mathsf{lpf} (n^i \cdot m^j) = n, \qquad \text{for } i, j > 0.$$
I am trying to prove it by double induction on $i$ and $j$ but I am getting stuck. First I need to show that the least prime factor of $n \cdot m$ is $n$, but how? Well, I could suppose that there exists a prime number $k < n$ that factors $n \cdot m$ and try to derive a contradiction. But now I have no clue how to proceed... And what about the inductive cases?
Any help would be greatly appreciated!