






"""simple docstring"""


from itertools import combinations, product




def 					a			(  UpperCamelCase_				:					int  ,						UpperCamelCase_				:					int  ,						UpperCamelCase_				:					int  ,						UpperCamelCase_				:					int		)	->		bool:
 if xa == ya == 0 or xa == ya == 0:
  return False
 __A						:							str      =						xa * xa + ya * ya
 __A						:							Optional[int]      =						xa * xa + ya * ya
 __A						:							Optional[Any]      =						(xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
 return (
     a_square + b_square == c_square
     or a_square + c_square == b_square
     or b_square + c_square == a_square
 )




def 					a			(  UpperCamelCase_				:					int = 5_0		)	->		int:
 return sum(
     1
     for pta, pta in combinations(product(range(limit + 1		)  ,						repeat=2		)  ,						2		)
     if is_right(*UpperCamelCase_  ,						*UpperCamelCase_		)		)


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













"""simple docstring"""


import importlib.metadata
import subprocess
import sys




def 					a			(  UpperCamelCase_				:					bool = False		)	->		Optional[Any]:
 __A						:							List[Any]      =						False
 if "IPython" in sys.modules:
  __A						:							List[Any]      =						'google.colab' in str(sys.modules['IPython'].get_ipython()		)

 if in_colab:
  if upgrade:
   __A						:							Dict      =						['pip', 'install', '-U', 'torch']
   subprocess.run(UpperCamelCase_  ,						check=UpperCamelCase_		)
  # get the current version of torch
  __A						:							int      =						importlib.metadata.version('torch'		)
  __A						:							int      =						torch_version[: torch_version.rindex('.'		)]
  __A						:							Any      =						F"https://storage.googleapis.com/tpu-pytorch/wheels/colab/torch_xla-{torch_version_trunc}-cp37-cp37m-linux_x86_64.whl"
  __A						:							int      =						['pip', 'install', xla_wheel]
  subprocess.run(UpperCamelCase_  ,						check=UpperCamelCase_		)
 else:
  raise RuntimeError('`install_xla` utility works only on google colab.'		)





