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:
from math import sqrt, ceil, floor

N = int(ceil(sqrt(1e9))) + 10
primes = [True] * N
prime_list = []

def init():
  for i in range(2, N):
    if primes[i]:
      prime_list.append(i)
      j = i * i
      while j < N:
        primes[j] = False
        j += i

def is_prime(num):
  if num < 2:
    return False

  up = int(floor(sqrt(num)))
  for p in prime_list:
    if p > up:
      break
    if num % p == 0:
      return False
  return True

def print_primes(m, n):
  for i in xrange(m, n + 1):
    if is_prime(i):
      print i

if __name__ == '__main__':
  init()

  cases = input()
  while cases > 0:
    m, n = map(int, raw_input().split())
    print_primes(m, n)
    cases -= 1
    if cases > 0:
      print