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)
import math
def get_input():
	first_num, second_num = raw_input().split()
	first_num = int(first_num)
	second_num = int(second_num)
	return first_num, second_num

global_primes = []

def is_prime(number):
	global global_primes
	square_root = int(math.sqrt(number))
	for prime in global_primes:
		if prime > square_root:
			return True
		if number % prime == 0:
			return False
def sieve():
	global global_primes
	maximum = 100001
	bool_array = [True]*maximum
	for index in range(2, maximum):
		if bool_array[index] == True :
			multiple = index
			multiple += index
			while multiple < maximum:
				bool_array[multiple] = False
				multiple += index
	for index in range(2, maximum):
		if bool_array[index] == True:
			global_primes.append(index)

def get_primes():
	primes = []
	first_num, second_num = get_input()
	if first_num == 1:
		first_num = 2
	for number in range(first_num, second_num+1):
		if is_prime(number):
			primes.append(number)
	return primes

if __name__ == '__main__':
	sieve()
	test_cases_num = int(raw_input())
	for x in range(0, test_cases_num):
		for number in get_primes():
			print number