


from math import sqrt


def 	UpperCAmelCase__      (      UpperCAmelCase__ :int					):






 '''simple docstring'''

 if 1 < number < 4:
  # 2 and 3 are primes
  return True
 elif number < 2 or number % 2 == 0 or number % 3 == 0:
  # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
  return False

 # All primes number are in format of 6k +/- 1
 for i in range(5 ,					int(sqrt(UpperCAmelCase__					) + 1					) ,					6					):
  if number % i == 0 or number % (i + 2) == 0:
   return False
 return True


def 	UpperCAmelCase__      (      UpperCAmelCase__ :int = 1_00_01					):






 '''simple docstring'''

 a						=		0
 a						=		1
 while count != nth and number < 3:
  number += 1
  if is_prime(UpperCAmelCase__					):
   count += 1
 while count != nth:
  number += 2
  if is_prime(UpperCAmelCase__					):
   count += 1
 return number


if __name__ == "__main__":
     print(F"""{solution() = }""")






from __future__ import annotations


def 	UpperCAmelCase__      (      UpperCAmelCase__ :int					):






 '''simple docstring'''

 a						=		str(UpperCAmelCase__					)
 return len(UpperCAmelCase__					) == 9 and set(UpperCAmelCase__					) == set("123456789"					)


def 	UpperCAmelCase__      (      ):






 '''simple docstring'''

 for base_num in range(99_99 ,					49_99 ,					-1					):
  a						=		10_00_02 * base_num
  if is_9_pandigital(UpperCAmelCase__					):
   return candidate

 for base_num in range(3_33 ,					99 ,					-1					):
  a						=		1_00_20_03 * base_num
  if is_9_pandigital(UpperCAmelCase__					):
   return candidate

 return None


if __name__ == "__main__":
     print(F"""{solution() = }""")

