What to print when gcd(a,b)!= 1?

If the number n and 1000000007 have gcd = 1, there exists a multiplicative inverse. But what to print when gcd!=1 for the two ?

can you share the code @raikunal251297?
Or explain what exactly are you trying to do?