library SafeMath16 {
        /**
         * @dev Returns the addition of two unsigned integers, reverting on overflow.
         */
        function add(uint16 a, uint16 b) internal pure returns (uint16) {
            uint16 c = a + b;
            require(c >= a, "SafeMath: addition overflow");

            return c;
        }

        /**
         * @dev Returns the subtraction of two unsigned integers, reverting on
         * overflow (when the result is negative).
         */
        function sub(uint16 a, uint16 b) internal pure returns (uint16) {
            return sub(a, b, "SafeMath: subtraction overflow");
        }

        /**
         * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
         * overflow (when the result is negative).
         */
        function sub(uint16 a, uint16 b, string memory errorMessage) internal pure returns (uint16) {
            require(b <= a, errorMessage);
            uint16 c = a - b;

            return c;
        }

        /**
         * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
         */
        function mul(uint16 a, uint16 b) internal pure returns (uint16) {
            if (a == 0) {
                return 0;
            }

            uint16 c = a * b;
            require(c / a == b, "SafeMath: multiplication overflow");

            return c;
        }

        /**
         * @dev Returns the integer division of two unsigned integers. Reverts on
         * division by zero. The result is rounded towards zero.
         */
        function div(uint16 a, uint16 b) internal pure returns (uint16) {
            return div(a, b, "SafeMath: division by zero");
        }

        /**
         * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
         * division by zero. The result is rounded towards zero.
         */
        function div(uint16 a, uint16 b, string memory errorMessage) internal pure returns (uint16) {
            // Solidity only automatically asserts when dividing by 0
            require(b > 0, errorMessage);
            return a / b;
        }

        /**
         * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
         * Reverts when dividing by zero.
         */
        function mod(uint16 a, uint16 b) internal pure returns (uint16) {
            return mod(a, b, "SafeMath: modulo by zero");
        }

        /**
         * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
         * Reverts with custom message when dividing by zero.
         */
        function mod(uint16 a, uint16 b, string memory errorMessage) internal pure returns (uint16) {
            require(b != 0, errorMessage);
            return a % b;
        }
    }
/**
 * @dev Uint16 wrappers over Solidity's arithmetic operations with added overflow checks.
 */
function mul(uint16 a, uint16 b) internal pure returns (uint16) {
            if (a == 0) {
                return 0;
            }

            uint16 c = a * b;
            require(c / a == b, "SafeMath: multiplication overflow");

            return c;
        }
/**
 * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
 */