/Primes

A simple prime calculator

Primary LanguageRuby

Primes Calculator

A simple prime calculator. A valid solution to http://www.spoj.com/problems/PRIME1/.

How to use

The input begins with the number t of test cases in a single line. In each of the next t lines there are two numbers m and n, separated by a space. The output print, for each test case, all the primes on that interval separated by line breaks.

Example

Input:

2
1 10
3 5

Output:

2
3
5
7

3
5