Updated PrimeFactorizer to address scenarios where the input was already prime.