// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint) {
        uint z = x + y;
        require(z >= x, "uint overflow");

        return z;
    }
}

library Math {
    function multiply(uint a, uint b) internal pure returns (uint) {
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;

    }
}

contract TestMathAsLibrary {
    function testMultiply(uint a, uint b) public pure returns (uint) {
        return Math.multiply(a, b);
    }
}

contract TestSafeMathMonkeyPatch {
    using SafeMath for uint;

    function testAdd(uint x, uint y) public pure returns (uint) {
        return x.add(y);
    }
}