[BOJ 7501] Key
View as PDFHackers often have to crack passwords for different data encryption systems. A novice hacker Bill faced such a problem one day. After performing several experiments he noticed regularity in the formation of an encryption key. He knew that a key is an odd integer K, such that K2does not divide (K-1)! and its value is in the range [A; B] (A ≤ K ≤ B). Note, that (K-1)! = (K-1)(K-2)...21). He was not able to advance further due to his poor mathematics.</p>
To help young hacker you have to find all possible values of the key.
입력 형식
Input consists of two integers A and B (3 ≤ A < B ≤ 1018, B - A ≤ 100).
출력 형식
Your program has to print to a single line of output all possible values of key K in ascending order divided by a single space. It is guaranteed that there is at least one key in the range. Key values are output in ascending order.
예제 입력 1
3 8
예제 출력 1
3 5 7
예제 입력 2
7 14
예제 출력 2
7 9 11 13
Comments