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
import math
def prime_gen(n1,n2):
    primes = []
    notprimes=[0]*(n2-n1+1)
    l=int(math.sqrt(n2))
    for i in xrange(2,l+1):
        j=n1//i
        while j*i<=n2:
            if j > 1 and j*i >= n1 :
                notprimes[j*i-n1] = 1
            j=j+1
    for i in xrange(n1,n2+1):
        if notprimes[i-n1] == 0 and i>1 :
            print i
def main():
    t = int(sys.stdin.readline())
    for i in xrange(t):
        n1,n2=map(int, sys.stdin.readline().split(' '))
        prime_gen(n1,n2)
if __name__=='__main__':
    main()