In this problem we are interested only in prime prime powers, i.e., numbers
of the form , where and are prime numbers.
For a given number , we want to find the -th smallest
prime prime power greater than .
Input
The first and only line of the input contains two integers and
(, ).
Output
The first and only line of output should contain one integer , such that
is the -th smallest prime prime power greater than .
Example
For the input data:
22 1
the correct result is:
25
whereas for the input data:
22 2
the correct result is:
27
Task author: Jakub Radoszewski.
Kontakt
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.