The Young Networker
The early 2000's...
Having just boasted about your extensive experience in designing small-scale home networks, you were asked to take on the job for your apartment block. Now is probably not the time to confess that this is really your first attempt.
So, the network will connect N users. Each of them connects to one of the hubs via a dedicated network cable. The hubs may also be connected to one another with similar cables. Any socket of a hub may be used by either an end user or for a connection to another hub. The final network will have to enable any pair of users to communicate with each other via one or more hubs.
Digging through your piles of old hardware, you found M hubs suitable for the purpose. The i-th of those hubs (1 ≤ i ≤ M) has k_i sockets for network cables.
As you have promised that each end user will only have pay for the cable to connect themselves to the nearest hub, you want to design the network using minimal number of your hubs (so you can keep the rest for future projects).
Are you up to the task?
Input
The first input line contains the integers N and M (2 ≤ N ≤ 1000, 1 ≤ M ≤ 300). The second line contains M integers, the values of k_i (2 ≤ k_i ≤ 48).
Output
If there is no solution, the only line of output should contain the text Epic fail.
Otherwise, the first line of output should contain K, the number of hubs used, and the second line K integers, the numbers of the hubs (they are numbered starting from one in the order they are given in the input).
If there are several solutions, output any one of them.