Fix 128-bit issue

The following code might have caused an overflow:
multiple = prime * prime;