Problem: Shridhar wants to generate some prime numbers for his cryptosystem. Help him!
Your task is to generate all prime numbers between two given numbers.


Input

The first line contains t, the number of test cases (less then or equal to 10). 

Followed by t lines which contain two numbers m and n (1 ≤ m ≤ n ≤ 1000000000, n-m ≤ 100000) separated by a space.


Output
For every test case print all prime numbers p such that m ≤ p ≤ n,
one number per line.  Separate the answers for each test case by an empty line.

Example
Input:
2
1 10
3 5

Output:
2
3
5
7

3
5

Warning: large Input/Output data, be careful with certain languages (though most should be OK if the algorithm is well designed)

Solution (in PYTHON):

Solution:
import random
def miller(number):
    if number == 2:
        return True
    elif number == 1 or number % 2 == 0:
        return False
    oddPart = number - 1
    timeTwo = 0
    while oddPart % 2 == 0:
        oddPart = oddPart / 2
        timeTwo = timeTwo + 1 
    for time in range(3):
        while True:
            randomNumber = random.randint(2, number)-1
            if randomNumber != 0 and randomNumber != 1:
                break
        randomPow = pow(randomNumber, oddPart, number)
        if (randomPow != 1) and (randomPow != number - 1):
            iterationNumber = 1
            while (iterationNumber <= timeTwo - 1) and (randomPow != number - 1):
                randomPow = pow(randomPow, 2, number)
                iterationNumber = iterationNumber + 1
            if (randomPow != (number - 1)):
                return False
    return True 

testcases = int(raw_input())
for i in range(testcases):
  se = [int(x) for x in raw_input().split(" ")]
  for i in range(se[0], se[1] + 1):
    if miller(i):
      print i
  print "\n"