The Sieve of Eratosthenes is a classic algorithm for finding every prime number not greater than (N). In this problem, you must follow the exact order in which numbers are removed from the sieve.
The algorithm works as follows.
Given (N) and (K), determine the number removed on the (K)-th removal.
The first line contains two integers (N) and (K). (1 \le K < N \le 1000)
Print the number that is removed on the (K)-th removal.