eolymp
Competitions

Азербайджан - подготовка. Февраль 27

Prime Generator

Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers between two given numbers.

Input

Starts with the number of test cases t (t10) in a single line. In each of the next t lines there are two numbers m and n (1mn109, n - m100000).

Output

For every test case print all prime numbers p such that mpn, one number per line, test cases separated by an empty line.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2
1 10
3 5
Output example #1
2
3
5
7

3
5