




'''simple docstring'''


from collections.abc import Sequence
from queue import Queue
class 						a_				:




	def __init__(       self     :  Union[str, Any]       ,		__lowerCAmelCase     :  str       ,		__lowerCAmelCase     :  Optional[int]       ,		__lowerCAmelCase     :  List[str]       ,		__lowerCAmelCase     :  Dict=None       ,		__lowerCAmelCase     :  Optional[int]=None      ):
							__snake_case						 =   start
							__snake_case						 =   end
							__snake_case						 =   val
							__snake_case						 =   (start + end) // 2
							__snake_case						 =   left
							__snake_case						 =   right




	def __repr__(       self     :  int      ):
							return F'SegmentTreeNode(start={self.start}, end={self.end}, val={self.val})'





class 						a_				:




	def __init__(       self     :  Dict       ,		__lowerCAmelCase     :  Sequence       ,		__lowerCAmelCase     :  Optional[Any]      ):
							__snake_case						 =   collection
							__snake_case						 =   function
							if self.collection:
													__snake_case						 =   self._build_tree(0       ,		len(__lowerCAmelCase      ) - 1      )




	def   lowercase__   (       self     :  str       ,		__lowerCAmelCase     :  Optional[int]       ,		__lowerCAmelCase     :  Any      ):
							self._update_tree(self.root       ,		__lowerCAmelCase       ,		__lowerCAmelCase      )




	def   lowercase__   (       self     :  Dict       ,		__lowerCAmelCase     :  Union[str, Any]       ,		__lowerCAmelCase     :  Optional[Any]      ):
							return self._query_range(self.root       ,		__lowerCAmelCase       ,		__lowerCAmelCase      )




	def   lowercase__   (       self     :  int       ,		__lowerCAmelCase     :  int       ,		__lowerCAmelCase     :  Dict      ):
							if start == end:
													return SegmentTreeNode(__lowerCAmelCase       ,		__lowerCAmelCase       ,		self.collection[start]      )
							__snake_case						 =   (start + end) // 2
							__snake_case						 =   self._build_tree(__lowerCAmelCase       ,		__lowerCAmelCase      )
							__snake_case						 =   self._build_tree(mid + 1       ,		__lowerCAmelCase      )
							return SegmentTreeNode(__lowerCAmelCase       ,		__lowerCAmelCase       ,		self.fn(left.val       ,		right.val      )       ,		__lowerCAmelCase       ,		__lowerCAmelCase      )




	def   lowercase__   (       self     :  List[Any]       ,		__lowerCAmelCase     :  int       ,		__lowerCAmelCase     :  Optional[int]       ,		__lowerCAmelCase     :  Union[str, Any]      ):
							if node.start == i and node.end == i:
													__snake_case						 =   val
													return
							if i <= node.mid:
													self._update_tree(node.left       ,		__lowerCAmelCase       ,		__lowerCAmelCase      )
							else:
													self._update_tree(node.right       ,		__lowerCAmelCase       ,		__lowerCAmelCase      )
							__snake_case						 =   self.fn(node.left.val       ,		node.right.val      )




	def   lowercase__   (       self     :  Tuple       ,		__lowerCAmelCase     :  Optional[Any]       ,		__lowerCAmelCase     :  Union[str, Any]       ,		__lowerCAmelCase     :  Dict      ):
							if node.start == i and node.end == j:
													return node.val

							if i <= node.mid:
													if j <= node.mid:
																			# range in left child tree
																			return self._query_range(node.left       ,		__lowerCAmelCase       ,		__lowerCAmelCase      )
													else:
																			# range in left child tree and right child tree
																			return self.fn(
																			    self._query_range(node.left       ,		__lowerCAmelCase       ,		node.mid      )       ,		self._query_range(node.right       ,		node.mid + 1       ,		__lowerCAmelCase      )       ,		)
							else:
													# range in right child tree
													return self._query_range(node.right       ,		__lowerCAmelCase       ,		__lowerCAmelCase      )




	def   lowercase__   (       self     :  Union[str, Any]      ):
							if self.root is not None:
													__snake_case						 =   Queue()
													queue.put(self.root      )
													while not queue.empty():
																			__snake_case						 =   queue.get()
																			yield node

																			if node.left is not None:
																									queue.put(node.left      )

																			if node.right is not None:
																									queue.put(node.right      )


if __name__ == "__main__":
	import operator

	for fn in [operator.add, max, min]:
		print("""*""" * 50)
		_lowercase  =			SegmentTree([2, 1, 5, 3, 4], fn)
		for node in arr.traverse():
			print(node)
		print()

		arr.update(1, 5)
		for node in arr.traverse():
			print(node)
		print()

		print(arr.query_range(3, 4))  # 7
		print(arr.query_range(2, 2))  # 5
		print(arr.query_range(1, 3))  # 13
		print()







'''simple docstring'''


from collections import defaultdict
def 						lowerCamelCase__   (				a    ,	a							):
						__snake_case						 =   first_str.lower().strip()
						__snake_case						 =   second_str.lower().strip()

						# Remove whitespace
						__snake_case						 =   first_str.replace(' '    ,	''							)
						__snake_case						 =   second_str.replace(' '    ,	''							)

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

						# Default values for count should be 0
						__snake_case						 =   defaultdict(a							)

						# For each character in input strings,
						# increment count in the corresponding
						for i in range(len(a							)							):
												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  =			input("""Enter the first string """).strip()
	_lowercase  =			input("""Enter the second string """).strip()

	_lowercase  =			check_anagrams(input_a, input_b)
	print(f'''{input_a} and {input_b} are {'' if status else 'not '}anagrams.''')

