NZEC in calculating Number of factors

https://www.codechef.com/problems/NUMFACT

I am trying to solve this question, but I am getting NZEC error.
This is my solution https://www.codechef.com/viewsolution/8966096
Can anyone help me fixing this issue.

Thanks.

Large numbers will easily overflow your ‘product’ variable they are multiplied to.

how should I resolve this, faced this problem many times

Use some Bigint implementation or go around the problem(e.g. do what you are doing for all the numbers on input and merge the results)