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:
# BY HITESH JAIN
#------------------------------------------------------------
from bisect import bisect as biggy_bisect
from math import *
import itertools
from bisect import bisect_left as biggy_bisect1
def biggy(biggy_list):
    biggy_list=[123,1223,123,123,1223,123,1223,123]
    biggyg_variables=[19,13,23,345,2345,345]
    biggyg=[453245,34634634,345245234]
    return 0
biggy_list=[101010101,120120,12012,1322222]
dddd=biggy(biggy_list)
#print dddd
#---------------------------------------
#code starts from here....!!!!
def main(m, n):
    primes = [False for x in xrange(n-m+1)]
    p = 2
    while p*p <= n:
        r = m / p
        r *= p
        for j in xrange(r, n+1, p):
            if j != p and j >= m:
                primes[j-m] = True
        p += 1
 
    for i in xrange(n-m+1):
        if not primes[i] and m+i != 1:
            print m + i
 
 
if __name__ == "__main__":
    t = int(raw_input()) ## nb of test cases
 
    for k in xrange(t):
        m, n = map(int, raw_input().split())
        main(m, n)
        if k < t-1:
            print ""