from __future__ import annotations

A_      =      1.6_0_2_1e-1_9  # units = C






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		)->       Optional[Any]:



			"""simple docstring"""







			if (conductivity, electron_conc, mobility).count(0       ) != 1:
						raise ValueError('''You cannot supply more or less than 2 values'''       )
			elif conductivity < 0:
						raise ValueError('''Conductivity cannot be negative'''       )
			elif electron_conc < 0:
						raise ValueError('''Electron concentration cannot be negative'''       )
			elif mobility < 0:
						raise ValueError('''mobility cannot be negative'''       )
			elif conductivity == 0:
						return (
						    "conductivity",
						    mobility * electron_conc * ELECTRON_CHARGE,
						)
			elif electron_conc == 0:
						return (
						    "electron_conc",
						    conductivity / (mobility * ELECTRON_CHARGE),
						)
			else:
						return (
						    "mobility",
						    conductivity / (electron_conc * ELECTRON_CHARGE),
						)


if __name__ == "__main__":
						import doctest

						doctest.testmod()






from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt






def        __UpperCAmelCase    (       UpperCAmelCase       )->       bool:



			"""simple docstring"""







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






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase       )->       tuple[int, int]:



			"""simple docstring"""







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






def        __UpperCAmelCase    (       UpperCAmelCase = 35       )->       int:



			"""simple docstring"""







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

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

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

															# n=2
															lowercase							=		x_num * x_num * y_num * y_num
															lowercase							=		(
															    x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
															)
															if is_sq(UpperCAmelCase       ) and is_sq(UpperCAmelCase       ):
																		lowercase							=		int(sqrt(UpperCAmelCase       )       )
																		lowercase							=		int(sqrt(UpperCAmelCase       )       )
																		lowercase							=		gcd(UpperCAmelCase,		UpperCAmelCase       )
																		z_num //= hcf
																		z_den //= hcf
																		if 0 < z_num < z_den <= order:
																					lowercase							=		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() = }")





