Given P={1,2,3,...} with usual < ordering

Let f(n)= the number of distinct prime divisors of n

(ie: f(1)=0, f(2)=1, f(3)=1, f(4)=1, f(5)=1, f(6)=2,...)

Now, define on P where:

a b iff f(a) < f(b) OR [f(a) = f(b) and a < b]

So, I need to prove that P with is a well-ordering; prove transitive, irreflexive, comparable, and that every non-empty subset has a least element. The last part here is my problem, everything else is fine but I need help proving the least element part.

I know that if you break up P into sets so that all numbers with 1 unique prime divisor goes into a subset, then all the numbers with 2 unique prime divisors go into a disjoint subset, and so on, where each subset is ordered as usual by <. Then, take the union of these subsets and it can be shown that it still holds the usual ordering of <, but we are now dealing with ordering so it is a well-ordering (since < is a well ordering). As a restatement of my issue, I need help writing this out and actually making it solid. I've been working on it for a while...

Cheers and thank you!