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:
def sieve(m, n, pool, d):
    pool.difference_update(range((m // d) * d, n+1, d))
 
def primegen(m, n):
    sqrt_n = n**0.5
    pool = set(range(m, n+1))
    pool.discard(1)
    sieve(m, n, pool, 2)
    if m <= 2 <= n: yield 2
    sieve(m, n, pool, 3)
    if m <= 3 <= n: yield 3
    for d in range(6, int(sqrt_n), 6):
        if (d-1) in pool: yield d-1
        sieve(m, n, pool, d-1)
        if (d+1) in pool: yield d+1
        sieve(m, n, pool, d+1)
    for p in sorted(pool):
        yield p
 
 
for _ in range(int(raw_input())):
    m, n = raw_input().split()
    m, n = int(m), int(n)
    for prime in primegen(m, n):
        print prime
    print