Problem A
Sum-up the Primes
Input: standard input
Output: standard output
Time Limit: 12 seconds

We all know from Goldbach’s conjecture that any even number greater than 2 can be expressed as a summation of two primes. Some odd numbers can also be expressed as summation of two primes. In this problem you will have to express a number as a summation of arbitrary number of primes less than 300. The conditions in detail are as follows:

 

1)      You have to express a number N (N<=1000) as a summation of t(t<=14) primes.

2)      Among the t primes any single odd primes can be present maximum two times. 2 can be present only once. For example, (5+5+3+3) is valid, but (3+3+3+7) or (2+2+3) is invalid according to this particular rule.

3)      All the prime numbers used must be less than 300.

4)      If there is more than one solution print the lexicographically smallest one.

5)      If there is no such expression of primes print the string “No Solution.”

 

Input

The input file contains less than 9340 lines of input. Each line contains two numbers N (0<N<=1000) and t (0<t<=14). The meaning of N and t are described in the problem statement. Input is terminated by a line where N=0 and t=0. This line should not be processed.

 

Output

For each line of input produce a block of 2 lines. The first line of such a block contains the output serial as shown in the sample output. Next line contains the lexicographically smallest expression that sums up to N. There is no space between the operators and operands. If N cannot be expressed as a summation of t primes output “No Solution.” 

 

Sample Input
20 10

100 4

10 2

0 0

 

Sample Output
CASE 1:

No Solution.

CASE 2:

11+11+17+61

CASE 3:

3+7


Problem setter: Shahriar Manzoor, ACM Valladolid Online Judge Team

 

A Cruel Joke :-)

 

It’s year 2010. The World Finals is over. A team from a poor Asian country is the champion. Everyone is very surprised but more surprise is waiting for the judges. After looking at the statistics the judges find that the champion team has solved all their six problems with six submissions (No wrong answer/crash etc). The old Chief Judge cannot suppress his curiosity and so he asks the champion team’s coach “How does your team show such an error free performance?” The coach gives a cruel smile and says “Hehe! In our regional contests the network speed is very slow, so it takes hours to get reply from the judges. The teams don’t expect to get replies during the contest time. After the contest judging goes on for about a month and then the rank list is published. So our good teams always submit the correct solution as they usually have no other choices.”