Prime numbers have many interesting applications in computer science. This problem is related to prime numbers, and to solve it you need to know the following two definitions.
Apparent prime: A positive integer that is not divisible by any integer greater than and less than or equal to is called an apparent prime. The value of will be provided to you.
Twin apparent primes: If the difference between two apparent primes is , they are called twin apparent primes.
Given the values of and , your task is to find an -digit apparent prime such that (p+2) is also an apparent prime.
The input contains at most lines. Each line contains two positive integers (3500 \leq n \leq 5000) and (t \leq 8000). Input ends with a line containing two zeroes. These two numbers are invalid input and should not be processed.
For each input line, output a single line containing an -digit apparent prime such that (p+2) is also an apparent prime. If there is more than one such , you may output any of them.
Ejemplo 1