def is_ens_domain(authority: str) ->bool:
    """
    Return false if authority is not a valid ENS domain.
    """
    if authority[-4:] != '.eth' or len(authority.split('.')) not in [2, 3]:
        return False
    return True
