

'''simple docstring'''
import math


def       a__    (  _SCREAMING_SNAKE_CASE					:    int							)			-> bool:


	"""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(math.sqrt(_SCREAMING_SNAKE_CASE							) + 1							)     ,							6							):
		if number % i == 0 or number % (i + 2) == 0:
			return False
	return True


def       a__    (  _SCREAMING_SNAKE_CASE					:    int = 60_08_51_47_51_43							)			-> int:


	"""simple docstring"""





	try:
		UpperCAmelCase_			:	Optional[int]      =   int(_SCREAMING_SNAKE_CASE							)
	except (TypeError, ValueError):
		raise TypeError("Parameter n must be int or castable to int."							)
	if n <= 0:
		raise ValueError("Parameter n must be greater than or equal to one."							)
	UpperCAmelCase_			:	Optional[int]      =   0
	if is_prime(_SCREAMING_SNAKE_CASE							):
		return n
	while n % 2 == 0:
		n //= 2
	if is_prime(_SCREAMING_SNAKE_CASE							):
		return n
	for i in range(3     ,							int(math.sqrt(_SCREAMING_SNAKE_CASE							)							) + 1     ,							2							):
		if n % i == 0:
			if is_prime(n // i							):
				UpperCAmelCase_			:	str      =   n // i
				break
			elif is_prime(_SCREAMING_SNAKE_CASE							):
				UpperCAmelCase_			:	int      =   i
	return max_number


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







import math
import os

import cva
import numpy as np

__UpperCAmelCase      = 255.0





def 	snake_case_      (__A     :						float					,   __A     :						float     )			->	float:
   __lowerCAmelCase  :			Any					    =						np.mean((original - contrast) ** 2     )
   if mse == 0:
      return 1_0_0

   return 2_0 * math.logaa(PIXEL_MAX / math.sqrt(__A     )     )





def 	snake_case_      ()			->	None:
   __lowerCAmelCase  :			int					    =						os.path.dirname(os.path.realpath(__A     )     )
   # Loading images (original image and compressed image)
   __lowerCAmelCase  :			Tuple					    =						cva.imread(os.path.join(__A					,   """image_data/original_image.png"""     )     )
   __lowerCAmelCase  :			Dict					    =						cva.imread(os.path.join(__A					,   """image_data/compressed_image.png"""     )					,   1     )

   __lowerCAmelCase  :			Optional[int]					    =						cva.imread(os.path.join(__A					,   """image_data/PSNR-example-base.png"""     )     )
   __lowerCAmelCase  :			Optional[int]					    =						cva.imread(
       os.path.join(__A					,   """image_data/PSNR-example-comp-10.jpg"""     )					,   1     )

   # Value expected: 29.73dB
   print("""-- First Test --"""     )
   print(f'''PSNR value is {peak_signal_to_noise_ratio(__A					,   __A     )} dB'''     )

   # # Value expected: 31.53dB (Wikipedia Example)
   print("""\n-- Second Test --"""     )
   print(f'''PSNR value is {peak_signal_to_noise_ratio(__A					,   __A     )} dB'''     )


if __name__ == "__main__":
   main()


