import re


def is_line_all_header_1_or_2(line):
    """Returns True if the given line is all '=' or all '-'."""
    match_obj = re.search("^[=]+$", line.rstrip())
    if match_obj:
        return True

    match_obj = re.search("^[\\-]+$", line.rstrip())
    if match_obj:
        return True

    return False