Buffcraft

No attempts yetTime limit2sMemory limit256 MB

Problem

Brenda plays the role playing game Buffcraft. Shields, swords, books and other carried items do not change a character's stats in Buffcraft. The only way to raise a stat is to buff the character.

Buffcraft has two kinds of buffs. A direct buff raises the base value of a stat, and a percentage buff raises the stat by a fraction of that base value. To be precise, if the unbuffed base value of a stat is bb and the character carries nn direct buffs of strength d1,d2,,dnd_1, d_2, \dots, d_n together with mm percentage buffs of strength p1,p2,,pmp_1, p_2, \dots, p_m, the resulting stat equals (b+d1+d2++dn)(100+p1+p2++pm)/100(b + d_1 + d_2 + \dots + d_n)(100 + p_1 + p_2 + \dots + p_m)/100. The resulting stat can be fractional.

A character has only kk buff slots. If more than kk buffs are applied, only the last kk stay active, so there is no reason to apply more than kk buffs at once. The same buff cannot be applied twice.

Brenda is about to send her character on a raid and wants its health as high as possible. Choose the set of buffs that gives the maximum total health.

Input

The first line contains four integers bb, kk, cdc_d, cpc_p: the base health of the character, the number of buff slots, the number of available direct buffs, and the number of available percentage buffs.

The second line contains cdc_d integers did_i, the strengths of the direct buffs.

The third line contains cpc_p integers pip_i, the strengths of the percentage buffs.

Every number in the input is at least 0 and at most 50000. If cdc_d or cpc_p is 0, the matching line is empty.

Output

Print on the first line the number nn of direct buffs and the number mm of percentage buffs to apply (0ncd0 \le n \le c_d, 0mcp0 \le m \le c_p, 0n+mk0 \le n + m \le k).

Print on the second line the nn indices of the chosen direct buffs in increasing order. Buffs are numbered from 1.

Print on the third line the mm indices of the chosen percentage buffs in increasing order.

If nn or mm is 0, print an empty line in its place.

Several sets of buffs can reach the maximum health, so print the set that the following rule selects.

  1. Sort the direct buffs by decreasing strength, putting the smaller index first when two strengths are equal. Sort the percentage buffs the same way.
  2. For each nn from 00 to min(k,cd)\min(k, c_d), set m=min(kn,cp)m = \min(k - n, c_p) and take the first nn direct buffs and the first mm percentage buffs of those sorted orders.
  3. Among these candidates print the one with the largest resulting health. If several candidates give the same health, print the one with the smallest nn.