Sponsored
Use these hints if you're stuck. Try solving on your own first.
Consider only the numbers which have a good prime factorization.
Use brute force to find all possible good subsets and then calculate its frequency in nums.
Solve with full IDE support and test cases