Primes of the difference K P1062

Title Description

Give you two numbers n and k, requesting all difference less than or equal to n k primes in.

Input Format

Two positive integers n, k. 1 <= k <= n <= 10000.

Output Format

All prime number less than equal to n pair. Each pair of primes output line, separated by a single space. If not found any prime number pairs output empty.

Sample input

6924 809

Sample Output

2 811

Guess you like

Origin www.cnblogs.com/problems/p/P1062.html