That's a prime... almost
Pyth, 9 bytes
e.fqlPZQE

Explanation
          - autoassign Q = eval(input())
     PZ   -      prime_factors(Z) 
    l     -     len(^)
   q   Q  -    ^ == Q
 .f     E -  first eval(input()) of (^ for Z in range(inf))
e         - ^[-1]

Try it here!
Or try a test suite!