contract Pausable is Ownable {
    event Paused(address account);
    event Unpaused(address account);
    event PausableRenounced(address account);

    bool private _paused;
    bool private _pausable;

    constructor () internal {
        _paused = false;
        _pausable = true;
    }

    /**
     * @return True if the contract is paused, false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @return True if the contract is pausable, false otherwise.
     */
    function pausable() public view returns (bool) {
        return _pausable;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused() {
        require(!_paused);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(_paused);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not pausable.
     */
    modifier whenNotPausable() {
        require(!_pausable);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is pausable.
     */
    modifier whenPausable() {
        require(_pausable);
        _;
    }

    /**
     * @dev Called by the owner to pause.
     */
    function pause() public onlyOwner whenPausable whenNotPaused {
        _paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @dev Called by the owner to unpause.
     */
    function unpause() public onlyOwner whenPaused {
        _paused = false;
        emit Unpaused(msg.sender);
    }

    /**
     * @dev Called by the owner to unpause.
     */
    function renouncePausable() public onlyOwner whenPausable {
        _pausable = false;
        emit PausableRenounced(msg.sender);
    }
}
/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
function pause() public onlyOwner whenPausable whenNotPaused {
    _paused = true;
    emit Paused(msg.sender);
}

/**
 * @dev Called by the owner to pause.
 */