


from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt


def __lowercase     (      lowerCamelCase_  :      Tuple  ):
				SCREAMING_SNAKE_CASE__     							=				int(number**0.5  )
				return number == sq * sq


def __lowercase     (      lowerCamelCase_  :      Any						,					lowerCamelCase_  :      Tuple						,					lowerCamelCase_  :      Dict						,					lowerCamelCase_  :      int						,					lowerCamelCase_  :      Optional[int]						,					lowerCamelCase_  :      int  ):
				SCREAMING_SNAKE_CASE__     							=				x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
				SCREAMING_SNAKE_CASE__     							=				x_den * y_den * z_den
				SCREAMING_SNAKE_CASE__     							=				gcd(UpperCamelCase__						,					UpperCamelCase__  )
				top //= hcf
				bottom //= hcf
				return top, bottom


def __lowercase     (      lowerCamelCase_  :      Optional[Any] = 35  ):
				SCREAMING_SNAKE_CASE__     							=				set()
				SCREAMING_SNAKE_CASE__     							=				42
				SCREAMING_SNAKE_CASE__     							=				Fraction(0  )
				SCREAMING_SNAKE_CASE__     							=				42

				for x_num in range(1						,					order + 1  ):
								for x_den in range(x_num + 1						,					order + 1  ):
												for y_num in range(1						,					order + 1  ):
																for y_den in range(y_num + 1						,					order + 1  ):
																				# n=1
																				SCREAMING_SNAKE_CASE__     							=				x_num * y_den + x_den * y_num
																				SCREAMING_SNAKE_CASE__     							=				x_den * y_den
																				SCREAMING_SNAKE_CASE__     							=				gcd(UpperCamelCase__						,					UpperCamelCase__  )
																				z_num //= hcf
																				z_den //= hcf
																				if 0 < z_num < z_den <= order:
																								SCREAMING_SNAKE_CASE__     							=				add_three(
																								    UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__  )
																								unique_s.add(UpperCamelCase__  )

																				# n=2
																				SCREAMING_SNAKE_CASE__     							=				(
																				    x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
																				)
																				SCREAMING_SNAKE_CASE__     							=				x_den * x_den * y_den * y_den
																				if is_sq(UpperCamelCase__  ) and is_sq(UpperCamelCase__  ):
																								SCREAMING_SNAKE_CASE__     							=				int(sqrt(UpperCamelCase__  )  )
																								SCREAMING_SNAKE_CASE__     							=				int(sqrt(UpperCamelCase__  )  )
																								SCREAMING_SNAKE_CASE__     							=				gcd(UpperCamelCase__						,					UpperCamelCase__  )
																								z_num //= hcf
																								z_den //= hcf
																								if 0 < z_num < z_den <= order:
																												SCREAMING_SNAKE_CASE__     							=				add_three(
																												    UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__  )
																												unique_s.add(UpperCamelCase__  )

                    # n=-1
																				SCREAMING_SNAKE_CASE__     							=				x_num * y_num
																				SCREAMING_SNAKE_CASE__     							=				x_den * y_num + x_num * y_den
																				SCREAMING_SNAKE_CASE__     							=				gcd(UpperCamelCase__						,					UpperCamelCase__  )
																				z_num //= hcf
																				z_den //= hcf
																				if 0 < z_num < z_den <= order:
																								SCREAMING_SNAKE_CASE__     							=				add_three(
																								    UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__  )
																								unique_s.add(UpperCamelCase__  )

																				# n=2
																				SCREAMING_SNAKE_CASE__     							=				x_num * x_num * y_num * y_num
																				SCREAMING_SNAKE_CASE__     							=				(
																				    x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
																				)
																				if is_sq(UpperCamelCase__  ) and is_sq(UpperCamelCase__  ):
																								SCREAMING_SNAKE_CASE__     							=				int(sqrt(UpperCamelCase__  )  )
																								SCREAMING_SNAKE_CASE__     							=				int(sqrt(UpperCamelCase__  )  )
																								SCREAMING_SNAKE_CASE__     							=				gcd(UpperCamelCase__						,					UpperCamelCase__  )
																								z_num //= hcf
																								z_den //= hcf
																								if 0 < z_num < z_den <= order:
																												SCREAMING_SNAKE_CASE__     							=				add_three(
																												    UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__						,					UpperCamelCase__  )
																												unique_s.add(UpperCamelCase__  )

				for num, den in unique_s:
								total += Fraction(UpperCamelCase__						,					UpperCamelCase__  )

				return total.denominator + total.numerator


if __name__ == "__main__":
	print(f"""{solution() = }""")




"""simple docstring"""






from transformers import BertTokenizerFast

from .custom_tokenization import CustomTokenizer


class 			lowerCamelCase_		(			lowercase   ):





				"""simple docstring"""







				_lowerCAmelCase      :      List[Any]      							=					CustomTokenizer
				pass
