class UInt64 implements UInt64Value<UInt64> {

  @Override
  public UInt64 multiplyMod(UInt64 value, UInt64 modulus) {
    if (modulus.isZero()) {
      throw new ArithmeticException("multiplyMod with zero modulus");
    }
    if (this.value == 0 || value.value == 0) {
      return ZERO;
    }
    if (value.value == 1) {
      return mod(modulus);
    }
    return create(toBigInteger().multiply(value.toBigInteger()).mod(modulus.toBigInteger()).longValue());
  }

  private  UInt64(long value);

}