def sort_list_files(list_patches, list_masks):
    """
    Sorts a list of patches and masks depending on their id.
    :param list_patches: List of name of patches in the folder, that we want to sort.
    :param list_masks: List of name of masks in the folder, that we want to sort.
    :return: List of sorted lists, respectively of patches and masks.
    """
    return sorted(list_patches, key=lambda x: int(x[1])), sorted(list_masks,
        key=lambda x: int(x[1]))
