def import_memory_data(filename):
    """
    Imports the special memory data format.
    # are comments, empty lines ignored, pairs of integer
    """
    with open(filename, "r") as f:
        contents = f.read()

    lines = contents.splitlines()
    avals = []
    bvals = []
    for line in lines:
        line = line.strip()
        if line == "" or line.startswith("#"):
            continue

        spl = line.split(" ")
        assert len(spl) == 2
        avals.append(int(spl[0].strip()))
        bvals.append(int(spl[1].strip()))
    assert len(avals) == len(bvals)
    return avals, bvals