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 sys
infile = sys.stdin

limit = 1000000000
sqrt_lim = int(round(limit**0.5))
is_prime = [1]*sqrt_lim
is_prime[0] = is_prime[1] = 0
for i in xrange(4, sqrt_lim, 2):
    is_prime[i] = 0
for n in xrange(3, int(round(sqrt_lim**0.5)), 2):
    if is_prime[n]:
        for i in xrange(n*n, sqrt_lim, n):
            is_prime[i] = 0
primes = [x for x, prime in enumerate(is_prime) if prime]

def print_primes(a, b):
    if a <= 2:
        print 2
    if not a&1:
        a += 1
    for n in xrange(a, b+1, 2):
        if n < sqrt_lim:
            if is_prime[n]: print n
            continue
        sqrt_n = n**0.5 if n < 999002449 else None
        prime = True
        for i in primes:
            if sqrt_n and i > sqrt_n:
                break
            if not n%i:
                prime = False
                break
        if prime:
            print n

t = int(infile.readline())
for i in xrange(t):
    m, n = infile.readline().split()
    print_primes(int(m),int(n))
    print ""