int
ModPow(
a,
b,
n)
{
rec=1;
while
(b)
if
(b & 1)
rec = (rec * a) % n;
a = (a * a) % n;
b >>= 1;
}
return
rec % n;