#PLATON. Platon and Socrates

Platon and Socrates

Platon and Socrates one day decided to play a new game. They asked their friend to think of two numbers between 1 and 5000, not equal. Then they asked him to tell the product to Platon and the sum to Socrates. After that they tried to figure out what these numbers are. They played a lot of times but none of them could guess these numbers. Finally they made it!! Here is the dialogue:

  • [P] : I don't know the answer.
  • [S] : I knew you wouldn't know, I don't know it either.
  • [P] : Now I know it.
  • [S] : I know it too.

Your task is to find all pairs Platon and Socrates could have been thinking about. Numbers are limited to the given range.

Input

Input starts with a single integer t, the number of test cases (t<=2000). t test cases follow. Each test case consists of one line containing two integers l r seperated by a single space, denoting the range of numbers ( 1<= l < r <=5000, r-l < 200 ).

Output

For the i-th test case output a line with the text case i. In the next line print n - number of pairs from range (l,r). Then exactly n lines follow with two numbers seperated by single space. The first number is not greater than the second. Pairs are printed in increasing sum order.

Example

Input
2
1 10
2 8

Output
case 1
0
case 2
0