


'''simple docstring'''






from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey
from numpy import divide, inta, multiply, ravel, sort, zeros_like






def 						_A					(lowerCAmelCase__	:List[Any]					,    lowerCAmelCase__	:int=3		) ->	str:




     '''simple docstring'''



     _a         =				int(mask / 2		)
     # copy image size
     _a         =				zeros_like(lowerCAmelCase__		)
     for i in range(lowerCAmelCase__					,    gray_img.shape[0] - bd		):
          for j in range(lowerCAmelCase__					,    gray_img.shape[1] - bd		):
               # get mask according with mask
               _a         =				ravel(gray_img[i - bd : i + bd + 1, j - bd : j + bd + 1]		)
               # calculate mask median
               _a         =				sort(lowerCAmelCase__		)[inta(divide((multiply(lowerCAmelCase__					,    lowerCAmelCase__		))					,    2		) + 1		)]
               _a         =				median
     return median_img


if __name__ == "__main__":
 # read original image
 a_       :     Optional[Any] 							=     imread("../image_data/lena.jpg")
 # turn image in gray scale value
 a_       :     str 							=     cvtColor(img, COLOR_BGR2GRAY)

 # get values with two different mask size
 a_       :     Tuple 							=     median_filter(gray, 3)
 a_       :     List[str] 							=     median_filter(gray, 5)

 # show result images
 imshow("median filter with 3x3 mask", medianaxa)
 imshow("median filter with 5x5 mask", medianaxa)
 waitKey(0)





'''simple docstring'''






def 						_A					(lowerCAmelCase__	:int					,    lowerCAmelCase__	:int		) ->	int:




     '''simple docstring'''



     if a < b:
          return gcd(lowerCAmelCase__					,    lowerCAmelCase__		)
     if a % b == 0:
          return b
     return gcd(lowerCAmelCase__					,    a % b		)






def 						_A					(lowerCAmelCase__	:int					,    lowerCAmelCase__	:int					,    lowerCAmelCase__	:int		) ->	int:




     '''simple docstring'''



     if y == 0:
          return 1
     _a         =				power(lowerCAmelCase__					,    y // 2					,    lowerCAmelCase__		) % mod
     _a         =				(temp * temp) % mod
     if y % 2 == 1:
          _a         =				(temp * x) % mod
     return temp






def 						_A					(lowerCAmelCase__	:int		) ->	bool:




     '''simple docstring'''



     _a         =				2
     while b < n:
          if gcd(lowerCAmelCase__					,    lowerCAmelCase__		) == 1 and power(lowerCAmelCase__					,    n - 1					,    lowerCAmelCase__		) != 1:
               return False
          b += 1
     return True


if __name__ == "__main__":
 a_       :     Any 							=     int(input("Enter number: ").strip())
 if is_carmichael_number(number):
  print(f'''{number} is a Carmichael Number.''')
 else:
  print(f'''{number} is not a Carmichael Number.''')

