


'''simple docstring'''




from __future__ import annotations

from typing import Any



class 			lowerCAmelCase					:



	def __init__(       self			,       snake_case__			,       snake_case__     ):  # noqa: A002
		lowerCAmelCase       :     Optional[int]   				=			item
		lowerCAmelCase       :     Tuple   				=			next



class 			lowerCAmelCase					:



	def __init__(       self     ):
		lowerCAmelCase       :     Node | None   				=			None
		lowerCAmelCase       :     Tuple   				=			0



	def 					lowercase  (       self			,       snake_case__     ):
		lowerCAmelCase       :     Dict   				=			Node(snake_case__			,       self.head     )
		self.size += 1



	def 					lowercase  (       self     ):
		# Switched 'self.is_empty()' to 'self.head is None'
		# because mypy was considering the possibility that 'self.head'
		# can be None in below else part and giving error
		if self.head is None:
			return None
		else:
			lowerCAmelCase       :     List[Any]   				=			self.head.item
			lowerCAmelCase       :     Any   				=			self.head.next
			self.size -= 1
			return item



	def 					lowercase  (       self     ):
		return self.head is None



	def __str__(       self     ):
		if self.is_empty():
			return ""
		else:
			lowerCAmelCase       :     List[str]   				=			self.head
			lowerCAmelCase       :     Optional[Any]   				=			''
			lowerCAmelCase       :     list[str]   				=			[]
			while iterate:
				item_list.append(str(iterate.item     )     )
				lowerCAmelCase       :     str   				=			iterate.next

			lowerCAmelCase       :     str   				=			' --> '.join(snake_case__     )

			return item_str



	def __len__(       self     ):
		return self.size




'''simple docstring'''




from itertools import combinations, product

def       __UpperCamelCase     (     _A     :					int       , _A     :					int       , _A     :					int       , _A     :					int					)     ->   bool:




	"""simple docstring"""





	if xa == ya == 0 or xa == ya == 0:
		return False
	lowerCAmelCase       :     Optional[Any]   				=			xa * xa + ya * ya
	lowerCAmelCase       :     Tuple   				=			xa * xa + ya * ya
	lowerCAmelCase       :     List[str]   				=			(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       __UpperCamelCase     (     _A     :					int = 50					)     ->   int:




	"""simple docstring"""





	return sum(
	    1
	    for pta, pta in combinations(product(range(limit + 1					)       , repeat=2					)       , 2					)
	    if is_right(*_A       , *_A					)					)


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