```python
def tag_open(marker: str) -> str:
    """
    Returns the name inside a marker written between angle brackets, dropping a leading slash when there is one.
    >>> tag_open("<div>")
    'div'
    >>> tag_open("</div>")
    'div'
    >>> tag_open("<script>")
    'script'
    >>> tag_open("/script")
    ValueError: Invalid marker: /script
    """
    if not marker.startswith("<") or not marker.endswith(">"):
        raise ValueError(f"Invalid marker: {marker}")
    return marker[1:-1]

def tag_pair(opening: str, closing: str) -> bool:
    """
    Says whether an opening marker and a closing marker name the same thing.
    >>> tag_pair("<div>", "</div>")
    True
    >>> tag_pair("<div>", "</div>")
    True
    >>> tag_pair("<div>", "</script>")
    False
    >>> tag_pair("<div", "</div>")
    ValueError: Invalid opening marker: <div>
    """
    if not opening.startswith("<") or not opening.endswith(">") or not closing.startswith("<") or not closing.endswith(">"):
        raise ValueError(f"Invalid opening or closing marker: {opening}, {closing}")
    return opening[1:-1] == closing[1:-1]
```