Help with MXMLCM!

Unable to find errors in my code, tried a lot. Please help!!!
Link to my solution is https://www.codechef.com/viewsolution/33432339
Thanks in advance.

lcm overflows