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, solSet, d):
	solSet.difference_update(xrange((m/d) * d, n+1, d))
	
def getPrimes(m, n):
	solutionSet = set(xrange(m, n+1))
	sqrt = int(n ** 0.5)
	solutionSet.discard(1)
	sieve(m, n, solutionSet, 2)
	if m <= 2 <= n:	yield 2
	sieve(m, n, solutionSet, 3)
	if m <= 3 <= n: yield 3
	
	for i in xrange(6, sqrt, 6):
		if ((i - 1) in solutionSet): yield i-1
		sieve(m , n, solutionSet, i-1)
		if ((i + 1) in solutionSet): yield i+1
		sieve(m, n, solutionSet, i+1)
		
	for prime in sorted(solutionSet):
		yield prime
		
for t in xrange(int(raw_input())):
	m,n = map(int, raw_input().split())
	
	for p in getPrimes(m,n):
		print p
	print ""