"""simple docstring"""





def    lowercase_   (   _lowerCamelCase:	str						,   _lowerCamelCase:	str      ) ->      bool:



							'''simple docstring'''

							__lowerCamelCase					:		Optional[int]		   =     len(_lowerCamelCase      ) + 1
							__lowerCamelCase					:		int		   =     len(_lowerCamelCase      ) + 1

							# dp is a 2d matrix where dp[i][j] denotes whether prefix string of
							# length i of input_string matches with prefix string of length j of
							# given pattern.
							# "dp" stands for dynamic programming.
							__lowerCamelCase					:		Union[str, Any]		   =     [[0 for i in range(_lowerCamelCase      )] for j in range(_lowerCamelCase      )]

							# since string of zero length match pattern of zero length
							__lowerCamelCase					:		Optional[Any]		   =     1

							# since pattern of zero length will never match with string of non-zero length
							for i in range(1						,   _lowerCamelCase      ):
														__lowerCamelCase					:		Optional[int]		   =     0

							# since string of zero length will match with pattern where there
							# is at least one * alternatively
							for j in range(1						,   _lowerCamelCase      ):
														__lowerCamelCase					:		List[Any]		   =     dp[0][j - 2] if pattern[j - 1] == "*" else 0

							# now using bottom-up approach to find for all remaining lengths
							for i in range(1						,   _lowerCamelCase      ):
														for j in range(1						,   _lowerCamelCase      ):
																					if input_string[i - 1] == pattern[j - 1] or pattern[j - 1] == ".":
																												__lowerCamelCase					:		Tuple		   =     dp[i - 1][j - 1]

																					elif pattern[j - 1] == "*":
																												if dp[i][j - 2] == 1:
																																			__lowerCamelCase					:		Tuple		   =     1
																												elif pattern[j - 2] in (input_string[i - 1], "."):
																																			__lowerCamelCase					:		Dict		   =     dp[i - 1][j]
																												else:
																																			__lowerCamelCase					:		Dict		   =     0
																					else:
																												__lowerCamelCase					:		Optional[Any]		   =     0

							return bool(dp[-1][-1]      )


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				# inputing the strings
				# input_string = input("input a string :")
				# pattern = input("input a pattern :")

				__A  =				'''aab'''
				__A  =				'''c*a*b'''

				# using function to check whether given string matches the given pattern
				if match_pattern(input_string, pattern):
								print(F"""{input_string} matches the given pattern {pattern}""")
				else:
								print(F"""{input_string} does not match with the given pattern {pattern}""")
"""simple docstring"""





from functools import lru_cache


def    lowercase_   (   _lowerCamelCase:	int      ) ->      set:



							'''simple docstring'''

							__lowerCamelCase					:		Optional[Any]		   =     2
							__lowerCamelCase					:		Tuple		   =     set()
							while i * i <= n:
														if n % i:
																					i += 1
														else:
																					n //= i
																					factors.add(_lowerCamelCase      )
							if n > 1:
														factors.add(_lowerCamelCase      )
							return factors


@lru_cache
def    lowercase_   (   _lowerCamelCase:	int      ) ->      int:



							'''simple docstring'''

							return len(unique_prime_factors(_lowerCamelCase      )      )


def    lowercase_   (   _lowerCamelCase:	list      ) ->      bool:



							'''simple docstring'''

							return len(set(_lowerCamelCase      )      ) in (0, 1)


def    lowercase_   (   _lowerCamelCase:	int      ) ->      list:



							'''simple docstring'''

							__lowerCamelCase					:		str		   =     2

							while True:
														# Increment each value of a generated range
														__lowerCamelCase					:		int		   =     [base + i for i in range(_lowerCamelCase      )]

														# Run elements through out unique_prime_factors function
														# Append our target number to the end.
														__lowerCamelCase					:		Dict		   =     [upf_len(_lowerCamelCase      ) for x in group]
														checker.append(_lowerCamelCase      )

														# If all numbers in the list are equal, return the group variable.
														if equality(_lowerCamelCase      ):
																					return group

														# Increment our base variable by 1
														base += 1


def    lowercase_   (   _lowerCamelCase:	int = 4      ) ->      int:



							'''simple docstring'''

							__lowerCamelCase					:		Any		   =     run(_lowerCamelCase      )
							return results[0] if len(_lowerCamelCase      ) else None


if __name__ == "__main__":
				print(solution())