
from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt






def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE				):
							_snake_case       =  int(number**0.5				)
							return number == sq * sq






def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				):
							_snake_case       =  x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
							_snake_case       =  x_den * y_den * z_den
							_snake_case       =  gcd(_SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				)
							top //= hcf
							bottom //= hcf
							return top, bottom






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

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

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

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

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

							return total.denominator + total.numerator


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

'''simple docstring'''
from urllib.parse import quote

import pytest

from datasets.utils.hub import hf_hub_url






@pytest.mark.parametrize("""repo_id"""							, ["""canonical_dataset_name""", """org-name/dataset-name"""]				)
@pytest.mark.parametrize("""path"""							, ["""filename.csv""", """filename with blanks.csv"""]				)
@pytest.mark.parametrize("""revision"""							, [None, """v2"""]				)
def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				):
							_snake_case       =  hf_hub_url(repo_id=_SCREAMING_SNAKE_CASE							, path=_SCREAMING_SNAKE_CASE							, revision=_SCREAMING_SNAKE_CASE				)
							assert url == f"""https://huggingface.co/datasets/{repo_id}/resolve/{revision or "main"}/{quote(_SCREAMING_SNAKE_CASE				)}"""