Test case failing

When i implemented Product Of Three Numbers, problem using seive and prime factorization i am getting one of the test case fail when submitting on codeforces ,please help find my mistake

below is the link of my code , it also contains detailed problem statement

@mehul.narendra.dubey,
Your code fails on,

Input
1
18

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.