SCUSA Region ACM Balloon Logo ICPC Masthead
2010 ACM ICPC South Central USA Regional Programming Contest

H - The Most Used Primes

It is known that prime numbers have many applications in mathematics, public-key cryptography, computer science, music, alien language processing, and so on. It was conjectured, by Goldbach, in a letter sent to Euler in 1742, that any even number can be written as a sum of two prime numbers, but he cannot find a proof of this. For example, 4 = 2 + 2 and there is no other combination. However, some even numbers have two or more combination, such as, 10 = 3 + 7 = 5 + 5. Note that based on commutativity, the combination 10 = 7 + 3 is not counted. 
Given two positive even integers, say L and U, larger than 3 and smaller than 100000, you are supposed to find the most used prime number in all the combinations of even numbers between L and U. If there is more than one number, you need to print them all. The last line should be the number of their occurrences.

Input

You will have a line containing a single integer N (1 ≤ N ≤ 100) indicating the number of data sets. Each data set will consist of one line containing two integers: L U, with L (3 ≤ L) specifying the lower margin and U (L ≤ U ≤ 100000) specifying the upper margin.

Output

For each data set in the input, print the most used prime number in all the combinations of even numbers between L and U. If there is more than one number, you need to print them all, each of them on a separate line in ascending order. The next to the last line of this data set should be the number of their occurrences. The last line of this data set should be a blank line.

Sample Input

3
4 10
10 30
6 24

Sample Output

3
4

7
9

3
5
8