Determine prime factors of a given positive integer (second version)