def is_valid_nickname(nick):
    """
    Return True if the given name is a valid nickname.
    """
    if len(nick) == 0 or len(nick) > 16:
        return False
    valid = (
        'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`^-_[]{}|\\'
        )
    invalid = set(nick) - set(valid)
    return not bool(invalid)
