public BigInteger Multiply (BigInteger a, BigInteger b)
{
if (a == 0 || b == 0) return 0;
if (a.length >= mod.length << 1)
a %= mod;
if (b.length >= mod.length << 1)
b %= mod;
if (a.length >= mod.length)
BarrettReduction (a);
if (b.length >= mod.length)
BarrettReduction (b);
BigInteger ret = new BigInteger (a * b);
BarrettReduction (ret);
return ret;
}