PrimeFactors solution