






'''simple docstring'''





from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt





def 	lowerCAmelCase_		(lowercase__						:       int       )		->    bool:


				'''simple docstring'''




				lowerCAmelCase__      			=						int(number**0.5       )
				return number == sq * sq





def 	lowerCAmelCase_		(lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int     ,					lowercase__						:       int       )		->    tuple[int, int]:


				'''simple docstring'''




				lowerCAmelCase__      			=						x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
				lowerCAmelCase__      			=						x_den * y_den * z_den
				lowerCAmelCase__      			=						gcd(lowercase__     ,					lowercase__       )
				top //= hcf
				bottom //= hcf
				return top, bottom





def 	lowerCAmelCase_		(lowercase__						:       int = 35       )		->    int:


				'''simple docstring'''




				lowerCAmelCase__      			=						set()
				lowerCAmelCase__      			=						42
				lowerCAmelCase__      			=						Fraction(0       )
				lowerCAmelCase__      			=						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
																				lowerCAmelCase__      			=						x_num * y_den + x_den * y_num
																				lowerCAmelCase__      			=						x_den * y_den
																				lowerCAmelCase__      			=						gcd(lowercase__     ,					lowercase__       )
																				z_num //= hcf
																				z_den //= hcf
																				if 0 < z_num < z_den <= order:
																								lowerCAmelCase__      			=						add_three(
																								    lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__     ,					lowercase__       )
																								unique_s.add(lowercase__       )

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

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

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

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

				return total.denominator + total.numerator


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













from math import isclose, sqrt





def 	lowerCAmelCase_		(lowercase__						:       float     ,					lowercase__						:       float     ,					lowercase__						:       float       )		->    tuple[float, float, float]:


				'''simple docstring'''




				lowerCAmelCase__      			=						point_y / 4 / point_x
				lowerCAmelCase__      			=						2 * normal_gradient / (1 + normal_gradient * normal_gradient)
				lowerCAmelCase__      			=						(1 - normal_gradient * normal_gradient) / (
				    1 + normal_gradient * normal_gradient
				)
				lowerCAmelCase__      			=						(sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

				# to find the next point, solve the simultaeneous equations:
				# y^2 + 4x^2 = 100
				# y - b = m * (x - a)
				# ==> A x^2 + B x + C = 0
				lowerCAmelCase__      			=						outgoing_gradient**2 + 4
				lowerCAmelCase__      			=						2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
				lowerCAmelCase__      			=						(point_y - outgoing_gradient * point_x) ** 2 - 1_00

				lowerCAmelCase__      			=						(
				    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
				) / (2 * quadratic_term)
				lowerCAmelCase__      			=						(
				    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
				) / (2 * quadratic_term)

				# two solutions, one of which is our input point
				lowerCAmelCase__      			=						x_minus if isclose(lowercase__     ,					lowercase__       ) else x_plus
				lowerCAmelCase__      			=						point_y + outgoing_gradient * (next_x - point_x)

				return next_x, next_y, outgoing_gradient





def 	lowerCAmelCase_		(lowercase__						:       float = 1.4     ,					lowercase__						:       float = -9.6       )		->    int:


				'''simple docstring'''




				lowerCAmelCase__      			=						0
				lowerCAmelCase__      			=						first_x_coord
				lowerCAmelCase__      			=						first_y_coord
				lowerCAmelCase__      			=						(10.1 - point_y) / (0.0 - point_x)

				while not (-0.01 <= point_x <= 0.01 and point_y > 0):
								lowerCAmelCase__			,		lowerCAmelCase__			,		lowerCAmelCase__      			=						next_point(lowercase__     ,					lowercase__     ,					lowercase__       )
								num_reflections += 1

				return num_reflections


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





