Added solution for Distinct primes factors