Bulb replacement

No attempts yetTime limit1sMemory limit256 MB

Problem

Byteasar's new house needs only the finishing work. All that is left is to screw one bulb into each of the nn rooms. Every room has a minimum power that lights it well enough, so room ii needs a bulb of power at least wiw_i.

Byteasar has already bought nn bulbs, and now he sees that they do not fit his plan. Some rooms may stay too dark, and some bulbs draw more power than the room needs. He decided to go to the store and swap a few bulbs, so that every room is lit well enough and the total power of the bulbs is as small as possible. The store has bulbs of every positive power. His backpack holds at most kk bulbs, so he can swap at most kk of them.

A bulb fits any room, so he places the nn bulbs into the nn rooms in any order he likes, one per room. Find the smallest possible total power of the bulbs in the house after swapping at most kk of them and lighting every room well enough.

Input

The first line has two integers nn and kk (1kn5000001 \le k \le n \le 500\,000), the number of rooms (which is also the number of bulbs) and the number of bulbs that fit in the backpack. Rooms are numbered from 11 to nn.

The second line has nn integers p1,p2,,pnp_1, p_2, \dots, p_n (1pi1091 \le p_i \le 10^9), the powers of the bulbs Byteasar owns.

The third line has nn integers w1,w2,,wnw_1, w_2, \dots, w_n (1wi1091 \le w_i \le 10^9), the minimum power each room needs. Room ii needs a bulb of power at least wiw_i.

Output

If swapping at most kk bulbs cannot light every room well enough, print NIE. Otherwise print one integer, the minimum total power of the bulbs in the house after swapping at most kk of them.

Hint

In the first example it is enough to swap the bulb of power 22 for a bulb of power 44 and the bulb of power 1010 for a bulb of power 44. Every room except the one that needs power 1111 then holds a bulb of exactly the power it needs, and that room holds a bulb of power 1212.