AT_past202303_m お片付け

Description

We have $ N $ parcels numbered $ 1 $ to $ N $ . Parcel $ i $ has a size of $ A_i $ . There are $ M $ boxes numbered $ 1 $ to $ M $ arranged in a row in numerical order: box $ 1 $ is the leftmost, and box $ M $ is the rightmost. Box $ i $ has a size of $ B_i $ . Each box can contain any number of parcels as long as the total size of the parcels is not greater than the size of the box. For each parcel in the order from parcel $ 1 $ to parcel $ N $ , Takahashi will try to do the following: - put the parcel into the leftmost box that can contain it. Determine whether Takahashi can put all parcels into boxes. Additionally, if he can, find the total size of parcels in each box after putting all parcels into boxes; otherwise, find the smallest number of a parcel that he cannot put into a box.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ M $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $ $ B_1 $ $ B_2 $ $ \ldots $ $ B_M $

Output Format

If Takahashi can put all parcels into boxes: The first line should contain `Yes`. The second line should contain $ C_1,C_2,\ldots,C_M $ with spaces in between, where $ C_i $ is the total size of the parcels in box $ i $ after putting all parcels into boxes. If Takahashi cannot put all parcels into boxes: The first line should contain `No`. The second line should contain the smallest number of a parcel that he cannot put into a box.

Explanation/Hint

### Sample Explanation 1 Takahashi will do the following. - Parcel $ 1 $ can be put into box $ 1 $ , $ 2 $ , or $ 3 $ . He puts it into the leftmost of them, box $ 1 $ . - Parcel $ 2 $ can be put into box $ 3 $ . He puts it into this box. - Parcel $ 3 $ can be put into box $ 1 $ or $ 2 $ . He puts it into the leftmost of them, box $ 1 $ . Note that when he tries to put parcel $ 2 $ , parcel $ 1 $ is already in box $ 1 $ , so parcel $ 2 $ cannot be put into this box. When all parcels are in boxes, - box $ 1 $ contains parcels $ 1 $ and $ 3 $ , for a total size of $ 3+4=7 $ , - box $ 2 $ contains no parcels, for a total size of $ 0 $ , and - box $ 3 $ contains parcel $ 2 $ , for a total size of $ 7 $ . ### Sample Explanation 2 Takahashi will do the following. - Parcel $ 1 $ can be put into box $ 1 $ or $ 2 $ . He puts it into the leftmost of them, box $ 1 $ . - Parcel $ 2 $ cannot be put into any box. ### Constraints - $ 1 \leq N \leq 2\times 10^5 $ - $ 1 \leq M \leq 2\times 10^5 $ - $ 1 \leq A_i,B_i \leq 10^9 $ - All values in the input are integers.