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:
t=input()
from math import sqrt 
limit = 32000                                                     #limit**2>10**9
prime = [True]*limit
for i in xrange(3, int(sqrt(limit)) + 1, 2):
	if prime[i]:
		prime[i*i: : 2*i] = [False]*len(xrange(i*i, limit, 2*i))
d =[2] +[i for i in xrange(3, limit, 2) if prime[i]]            #no need to calulate prime list upto n2 again and again 
for ww in range(t):
	m,n=map(int,raw_input().split())
	if (m==1):m+=1
	#n2=int(n**.5)     
	#d=fx1(n2)
	l1=set(range(m-m%2+1,n+1,2))
	for x in d:
	        if (x>n):break
		s=set(range(m-m%x,n+1,x))
		l1.difference_update(s)
		if (x>=m):l1.add(x)
		#print x,l1
		
	ansl=list(l1)
	ansl.sort()
	for x in ansl:print x