
from __future__ import annotations

class    lowerCAmelCase__     :






		def __init__(		self		:							Any							,			SCREAMING_SNAKE_CASE__		:							int  )     ->							None:
						__lowerCamelCase    					=	order

						# a_{0} ... a_{k}
						__lowerCamelCase    					=	[1.0] + [0.0] * order
						# b_{0} ... b_{k}
						__lowerCamelCase    					=	[1.0] + [0.0] * order

						# x[n-1] ... x[n-k]
						__lowerCamelCase    					=	[0.0] * self.order
						# y[n-1] ... y[n-k]
						__lowerCamelCase    					=	[0.0] * self.order






		def  __A       (		self		:							Optional[Any]							,			SCREAMING_SNAKE_CASE__		:							list[float]							,			SCREAMING_SNAKE_CASE__		:							list[float]  )     ->							None:
						if len(SCREAMING_SNAKE_CASE__  ) < self.order:
										__lowerCamelCase    					=	[1.0, *a_coeffs]

						if len(SCREAMING_SNAKE_CASE__  ) != self.order + 1:
										__lowerCamelCase    					=	(
										    f'''Expected a_coeffs to have {self.order + 1} elements '''
										    f'''for {self.order}-order filter, got {len(SCREAMING_SNAKE_CASE__  )}'''
										)
										raise ValueError(SCREAMING_SNAKE_CASE__  )

						if len(SCREAMING_SNAKE_CASE__  ) != self.order + 1:
										__lowerCamelCase    					=	(
										    f'''Expected b_coeffs to have {self.order + 1} elements '''
										    f'''for {self.order}-order filter, got {len(SCREAMING_SNAKE_CASE__  )}'''
										)
										raise ValueError(SCREAMING_SNAKE_CASE__  )

						__lowerCamelCase    					=	a_coeffs
						__lowerCamelCase    					=	b_coeffs







		def  __A       (		self		:							List[Any]							,			SCREAMING_SNAKE_CASE__		:							float  )     ->							float:
						__lowerCamelCase    					=	0.0

						# Start at index 1 and do index 0 at the end.
						for i in range(1							,			self.order + 1  ):
										result += (
										    self.b_coeffs[i] * self.input_history[i - 1]
										    - self.a_coeffs[i] * self.output_history[i - 1]
										)

						__lowerCamelCase    					=	(result + self.b_coeffs[0] * sample) / self.a_coeffs[0]

						__lowerCamelCase    					=	self.input_history[:-1]
						__lowerCamelCase    					=	self.output_history[:-1]

						__lowerCamelCase    					=	sample
						__lowerCamelCase    					=	result

						return result





from __future__ import annotations

from fractions import Fraction




def  __magic_name__ (   __lowerCAmelCase	:						int		,  __lowerCAmelCase	:						int							)			->   bool:
				return (
				    num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
				)




def  __magic_name__ (   __lowerCAmelCase	:						int							)			->   list[str]:
				__lowerCamelCase    					=	[]
				__lowerCamelCase    					=	11
				__lowerCamelCase    					=	int('''1''' + '''0''' * digit_len							)
				for num in range(__lowerCAmelCase		,  __lowerCAmelCase							):
								while den <= 99:
												if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
																if is_digit_cancelling(__lowerCAmelCase		,  __lowerCAmelCase							):
																				solutions.append(f'''{num}/{den}'''							)
												den += 1
								num += 1
								__lowerCamelCase    					=	10
				return solutions




def  __magic_name__ (   __lowerCAmelCase	:						int = 2							)			->   int:
				__lowerCamelCase    					=	1.0
				for fraction in fraction_list(__lowerCAmelCase							):
								__lowerCamelCase    					=	Fraction(__lowerCAmelCase							)
								result *= frac.denominator / frac.numerator
				return int(__lowerCAmelCase							)


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



