Mock CCC '20 Contest 1 J5 - A Prime Problem
View as PDF likes numbers which are constructed by concatenating two prime numbers together. A number which can be formed by concatenating
two primes that both have at least digits is a
-level prime pair certificate. Leading zeroes are not permitted.
Given two integers and
, compute the smallest
-level prime pair certificate greater than or equal to
.
Constraints
The output will never exceed .
There are no subtasks for this problem.
Input Specification
The input will consist of two positive space separated integers, and
.
Output Specification
Output the smallest -level prime pair certificate greater than or equal to
.
Sample Input
2 11328
Sample Output
11329
Comments