A few friends decided to do their laundry together. They are all very tidy, so on each day every friend wears one clean pair of socks and one clean shirt. All of their dirty socks and shirts have now been washed, and they want to hang everything up to dry with clothespins.
They agreed on the following rules:
If friend i collected laundry for di days, that friend has di pairs of socks and di shirts, and therefore needs 2⋅di clothespins for the socks (all of one color) and 3⋅di clothespins for the shirts (all of one color). A person may use the same color for both their socks and their shirts, or two different colors.
The friends have gathered all their clothespins and counted how many they have of each color. Help them find the smallest number of distinct colors they need to use.
The first line contains two integers n and k (2≤n,k≤1,000,000) — the number of friends and the number of available clothespin colors.
The second line contains n integers d1,d2,…,dn (1≤di≤1,000,000), where di is the number of days friend i was collecting laundry.
The third line contains k integers l1,l2,…,lk (1≤li≤4,000,000), where li is the number of clothespins of the i-th color.
Print a single integer: the minimum number of distinct clothespin colors needed to hang up all the laundry according to the rules. If it is impossible, print the single word NIE instead.
In the first example there are two friends. The first friend (d1=3) needs 6 clothespins for socks and 9 for shirts; the second friend (d2=4) needs 8 for socks and 12 for shirts. Since 8+12=20, the second friend can use the first color (which has 20 clothespins) for both socks and shirts. The first friend can then use, for example, the second and the fourth colors (each with 10 clothespins) — one for the socks and one for the shirts. Three colors are used in total.