If there is anything thatlikes, it is prime numbers. He likes them so much, he decided to throw his friend a prime party.
In order to make a prime themed birthday party, ~n~ ~(0 < n < 10\,000)~ dollars to spend on various goods. He also has a list of ~m~ ~(0 < m < 100)~ objects that he needs to buy that each cost ~m_i~ ~(1 \le m_i \le 100)~ dollars.has
He needs to buy the objects such that:
He buys each object at least twice.
The amount of each object is a prime number.
He spends a prime amount of money.
The first line contains the integer ~n~, the amount of money that he can spend.
The second line contains the integer ~m~, the number of objects he has to buy.
The next ~m~ lines contains ~m_i~, the price of each object. Each price is unique.
If it is possible to achieve the above goals, output
its primetime. Otherwise output
31 2 3 5
Explanation of Output
~2~ objects worth ~3~ dollars and ~5~ objects worth ~5~ dollars for a total of ~31~ dollars.can buy
2 1 97
is too poor to buy anything, so the party can't go on.