GCD 2 RUNTIME ERROR(SIGFPE) https://www.codechef.com/problems/GCD2

Don’t Know Why I am Getting The RunTime Error . COULD SOMEONE HELP WHERE I AM GETTING WRONG?
HERE BELOW IS MY SOLUTION GIVEN-