def get_paper_data(paper_name):
    """Gets paper code and paper type based on paper name"""
    split = paper_name.split("_")
    code = split[-1]
    paper_type = split[-2]

    if len(split) == 5:
        code = split[-2] + split[-3]
        paper_type = split[-1]

    elif len(split) == 3:
        code = "00"
        paper_type = split[-1]

    return code, paper_type