Alice likes pairs of integers. She calls two pairs of integers (a1,b1), (a2,b2) conflicting, if the absolute differences of the numbers within the pairs are the same, i.e. |a1−b1|=|a2−b2|. For example pairs (7,5) and (11,13) are conflicting, while (7,5) and (2,3) are not.
Bob likes primes. So, Alice wants to give him a list of pairs of primes as a present, hand-painted on a nice paper finished with a wooden frame. She wants to only use prime numbers between l and r, inclusive, and each at most once. She does not want to get uncomfortable when painting the present, so she absolutely must not use conflicting pairs. And finally, with these constraints in mind, she wants to make the largest gift possible, i.e. use the maximum amount of primes.
Input format:
Output:
For each test case, print the answer in the following format:
If there are multiple solutions that maximize the number of pairs, you can print any of them.
Scoring:
In all test sets, 1≤t≤10.
For the first test set, worth 14 points, it is guaranteed that there are no more than 11 primes in the interval [l,r].
For the second test set, worth 14 points, it is guaranteed that there are no more than 21 primes in the interval [l,r].
For the third test set, worth 16 points, it is guaranteed that there are no more than 42 primes in the interval [l,r].
For the fourth test set, worth 56 points, there are no additional constraints.
There are 5 primes in the range [1,11] - 2,3,5,7 and 11. Alice has made two pairs: (2,5) and (11,3). The absolute differences within the pairs are |2−5|=3 and |11−3|=8, respectively. As 3≠8, those pairs are not conflicting. It is clear that one cannot make 3 or more pairs using 5 items, so this is clearly one of the optimal solutions.