FUCT_FOR_PRIME - List prime number

Find all prime number between a and b inclusive.

Input

The first line of the input consist of a single integer number t which determines the number of tests.

In each of next t lines there are two numbers a and b separated by a space.

Constraints

  • 0 < t ≤ 1 000
  • 1 ≤ a, b ≤ 500

Output

For each test case print out all prime number found inside the range separated by a comma.

Separate your answers with a new line character.

Example

Input:
2
10 50
500 400

Output:
11,13,17,19,23,29,31,37,41,43,47
401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499

Added by:khanhvh
Date:2018-07-10
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:FPTU Can Tho

hide comments
2022-11-02 11:38:20 Mostafa 36a2
You said a ≤ b, but the example a=500, b= 400
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.