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:
#http://www.codechef.com/problems/PRIME1

test = int(raw_input())
for _ in range(test) :
	count = 0
	x,y = [int(i) for i in raw_input().split()]
	if x == 1 :
		x += 1
	if x <= 2 :
		print 2
		count += 1
	if x % 2 == 0 :
		x += 1

	r = set(xrange(x, y + 1, 2))
	
	sqrtY = int(y ** 0.5 + 1)
	d = set(xrange(3, sqrtY, 2))
	for i in range(3, sqrtY, 2) :
		if i in d :
			d.difference_update(xrange(i, sqrtY, i))
		
		if i in r :
			print i
			r.remove(i)
			
		if x < i :
			startIndex = i
		else :
			startIndex = x if x%i == 0 else x + (i - x%i)
		r.difference_update(xrange(startIndex, y+1, i))

	for i in sorted(r) :
		print i

	print ''