'''simple docstring'''




import colorsys

from PIL import Image  # type: ignore




def 							lowerCamelCase	(      UpperCAmelCase__       :					float      ,      UpperCAmelCase__       :					float      ,      UpperCAmelCase__       :					int )			->      float:
							lowercase_					:			Union[str, Any]										=       x
							lowercase_					:			Optional[int]										=       y
							for step in range(UpperCAmelCase__ ):  # noqa: B007
														lowercase_					:			List[str]										=       a * a - b * b + x
														lowercase_					:			Union[str, Any]										=       2 * a * b + y
														lowercase_					:			Optional[Any]										=       a_new

														# divergence happens for all complex number with an absolute value
														# greater than 4
														if a * a + b * b > 4:
																					break
							return step / (max_step - 1)




def 							lowerCamelCase	(      UpperCAmelCase__       :					float )			->      tuple:
							if distance == 1:
														return (0, 0, 0)
							else:
														return (255, 255, 255)




def 							lowerCamelCase	(      UpperCAmelCase__       :					float )			->      tuple:
							if distance == 1:
														return (0, 0, 0)
							else:
														return tuple(round(i * 255 ) for i in colorsys.hsv_to_rgb(UpperCAmelCase__      ,      1      ,      1 ) )




def 							lowerCamelCase	(      UpperCAmelCase__       :					int = 800      ,      UpperCAmelCase__       :					int = 600      ,      UpperCAmelCase__       :					float = -0.6      ,      UpperCAmelCase__       :					float = 0      ,      UpperCAmelCase__       :					float = 3.2      ,      UpperCAmelCase__       :					int = 50      ,      UpperCAmelCase__       :					bool = True      ,      )			->      Image.Image:
							lowercase_					:			int										=       Image.new("""RGB"""      ,      (image_width, image_height) )
							lowercase_					:			Optional[Any]										=       img.load()

							# loop through the image-coordinates
							for image_x in range(UpperCAmelCase__ ):
														for image_y in range(UpperCAmelCase__ ):
																					# determine the figure-coordinates based on the image-coordinates
																					lowercase_					:			Dict										=       figure_width / image_width * image_height
																					lowercase_					:			Union[str, Any]										=       figure_center_x + (image_x / image_width - 0.5) * figure_width
																					lowercase_					:			Union[str, Any]										=       figure_center_y + (image_y / image_height - 0.5) * figure_height

																					lowercase_					:			List[str]										=       get_distance(UpperCAmelCase__      ,      UpperCAmelCase__      ,      UpperCAmelCase__ )

																					# color the corresponding pixel based on the selected coloring-function
																					if use_distance_color_coding:
																												lowercase_					:			Optional[int]										=       get_color_coded_rgb(UpperCAmelCase__ )
																					else:
																												lowercase_					:			Union[str, Any]										=       get_black_and_white_rgb(UpperCAmelCase__ )

							return img


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						# colored version, full figure
						_lowercase						: Optional[Any]						=						get_image()

						# uncomment for colored version, different section, zoomed in
						# img = get_image(figure_center_x = -0.6, figure_center_y = -0.4,
						# figure_width = 0.8)

						# uncomment for black and white version, full figure
						# img = get_image(use_distance_color_coding = False)

						# uncomment to save the image
						# img.save("mandelbrot.png")

						img.show()






'''simple docstring'''




from collections import defaultdict




def 							lowerCamelCase	(      UpperCAmelCase__       :					str      ,      UpperCAmelCase__       :					str )			->      bool:
							lowercase_					:			Tuple										=       first_str.lower().strip()
							lowercase_					:			List[Any]										=       second_str.lower().strip()

							# Remove whitespace
							lowercase_					:			Dict										=       first_str.replace(""" """      ,      """""" )
							lowercase_					:			Tuple										=       second_str.replace(""" """      ,      """""" )

							# Strings of different lengths are not anagrams
							if len(UpperCAmelCase__ ) != len(UpperCAmelCase__ ):
														return False

							# Default values for count should be 0
							lowercase_					:			defaultdict[str, int]										=       defaultdict(UpperCAmelCase__ )

							# For each character in input strings,
							# increment count in the corresponding
							for i in range(len(UpperCAmelCase__ ) ):
														count[first_str[i]] += 1
														count[second_str[i]] -= 1

							return all(_count == 0 for _count in count.values() )


if __name__ == "__main__":
						from doctest import testmod

						testmod()
						_lowercase						: int						=						input("Enter the first string ").strip()
						_lowercase						: Tuple						=						input("Enter the second string ").strip()

						_lowercase						: Union[str, Any]						=						check_anagrams(input_a, input_b)
						print(f"""{input_a} and {input_b} are {"" if status else "not "}anagrams.""")





