library SafeMath
{
    // a add to b
    
    function add(uint a, uint b) internal constant returns (uint c) {
        c = a + b;
        assert(c >= a);
    }
    
    // a subtract b
    function sub(uint a, uint b) internal constant returns (uint c) {
        c = a - b;
        assert(c <= a);
    }
    
    // a multiplied by b
    function mul(uint a, uint b) internal constant returns (uint c) {
        c = a * b;
        assert(a == 0 || c / a == b);
    }
    
    // a divided by b
    function div(uint a, uint b) internal constant returns (uint c) {
        c = a / b;
        // No assert required as no overflows are posible.
    }
}
function sub(uint a, uint b) internal constant returns (uint c) {
    c = a - b;
    assert(c <= a);
}

// a subtract b