Added a solution (though slow) for primeFactorization problem