






class      lowercase__     :

	def __init__(							self		,    __UpperCAmelCase		,    __UpperCAmelCase=None		,    __UpperCAmelCase=None       )->					Any:







							'''simple docstring'''





							lowerCAmelCase__       =						data
							lowerCAmelCase__       =						previous
							lowerCAmelCase__       =						next_node

	def __str__(							self       )->					str:







							'''simple docstring'''





							return F"{self.data}"

	def 		UpperCAmelCase  (							self       )->					int:







							'''simple docstring'''





							return self.data

	def 		UpperCAmelCase  (							self       )->					Optional[int]:







							'''simple docstring'''





							return self.next


	def 		UpperCAmelCase  (							self       )->					int:







							'''simple docstring'''





							return self.previous





class      lowercase__     :

	def __init__(							self		,    __UpperCAmelCase       )->					Tuple:







							'''simple docstring'''





							lowerCAmelCase__       =						head

	def __iter__(							self       )->					Dict:







							'''simple docstring'''





							return self


	def 		UpperCAmelCase  (							self       )->					Tuple:







							'''simple docstring'''





							if not self.current:
													raise StopIteration
							else:
													lowerCAmelCase__       =						self.current.get_data()
													lowerCAmelCase__       =						self.current.get_next()
													return value





class      lowercase__     :

	def __init__(							self       )->					Dict:







							'''simple docstring'''





							lowerCAmelCase__       =						None  # First node in list
							lowerCAmelCase__       =						None  # Last node in list

	def __str__(							self       )->					Tuple:







							'''simple docstring'''





							lowerCAmelCase__       =						self.head
							lowerCAmelCase__       =						[]
							while current is not None:
													nodes.append(current.get_data()       )
													lowerCAmelCase__       =						current.get_next()
							return " ".join(str(__UpperCAmelCase       ) for node in nodes       )

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







							'''simple docstring'''





							lowerCAmelCase__       =						self.head
							while current:
													if current.get_data() == value:
																			return True
													lowerCAmelCase__       =						current.get_next()
							return False

	def __iter__(							self       )->					Any:







							'''simple docstring'''





							return LinkedListIterator(self.head       )

	def 		UpperCAmelCase  (							self       )->					Dict:







							'''simple docstring'''





							if self.head:
													return self.head.get_data()
							return None

	def 		UpperCAmelCase  (							self       )->					str:







							'''simple docstring'''





							if self.tail:
													return self.tail.get_data()
							return None

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase       )->					None:







							'''simple docstring'''





							if self.head is None:
													lowerCAmelCase__       =						node
													lowerCAmelCase__       =						node
							else:
													self.insert_before_node(self.head		,    __UpperCAmelCase       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase       )->					None:







							'''simple docstring'''





							if self.head is None:
													self.set_head(__UpperCAmelCase       )
							else:
													self.insert_after_node(self.tail		,    __UpperCAmelCase       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase       )->					None:







							'''simple docstring'''





							lowerCAmelCase__       =						Node(__UpperCAmelCase       )
							if self.head is None:
													self.set_head(__UpperCAmelCase       )
							else:
													self.set_tail(__UpperCAmelCase       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase       )->					None:







							'''simple docstring'''





							lowerCAmelCase__       =						node
							lowerCAmelCase__       =						node.previous

							if node.get_previous() is None:
													lowerCAmelCase__       =						node_to_insert
							else:
													lowerCAmelCase__       =						node_to_insert

							lowerCAmelCase__       =						node_to_insert

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase       )->					None:







							'''simple docstring'''





							lowerCAmelCase__       =						node
							lowerCAmelCase__       =						node.next

							if node.get_next() is None:
													lowerCAmelCase__       =						node_to_insert
							else:
													lowerCAmelCase__       =						node_to_insert

							lowerCAmelCase__       =						node_to_insert

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase       )->					None:







							'''simple docstring'''





							lowerCAmelCase__       =						1
							lowerCAmelCase__       =						Node(__UpperCAmelCase       )
							lowerCAmelCase__       =						self.head
							while node:
													if current_position == position:
																			self.insert_before_node(__UpperCAmelCase		,    __UpperCAmelCase       )
																			return
													current_position += 1
													lowerCAmelCase__       =						node.next
							self.insert_after_node(self.tail		,    __UpperCAmelCase       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase       )->					Node:







							'''simple docstring'''





							lowerCAmelCase__       =						self.head
							while node:
													if node.get_data() == item:
																			return node
													lowerCAmelCase__       =						node.get_next()
							raise Exception("Node not found"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase       )->					List[str]:







							'''simple docstring'''





							if (node := self.get_node(__UpperCAmelCase       )) is not None:
													if node == self.head:
																			lowerCAmelCase__       =						self.head.get_next()

													if node == self.tail:
																			lowerCAmelCase__       =						self.tail.get_previous()

													self.remove_node_pointers(__UpperCAmelCase       )

	@staticmethod
	def 		UpperCAmelCase  (							__UpperCAmelCase       )->					None:







							'''simple docstring'''





							if node.get_next():
													lowerCAmelCase__       =						node.previous

							if node.get_previous():
													lowerCAmelCase__       =						node.next

							lowerCAmelCase__       =						None
							lowerCAmelCase__       =						None


	def 		UpperCAmelCase  (							self       )->					List[str]:







							'''simple docstring'''





							return self.head is None





def        _a  (     ) ->   None:
						"""simple docstring"""









if __name__ == "__main__":
	import doctest

	doctest.testmod()














from collections import defaultdict
from math import ceil, sqrt


def        _a  (     UpperCamelCase_					:				int = 1_000_000    ,   UpperCamelCase_					:				int = 10   ) ->   int:
						"""simple docstring"""







						lowerCAmelCase__       =						defaultdict(UpperCamelCase_   )

						for outer_width in range(3    ,   (t_limit // 4) + 2   ):
												if outer_width * outer_width > t_limit:
																		lowerCAmelCase__       =						max(
																		    ceil(sqrt(outer_width * outer_width - t_limit   )   )    ,   1   )
												else:
																		lowerCAmelCase__       =						1

												hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

												for hole_width in range(UpperCamelCase_    ,   outer_width - 1    ,   2   ):
																		count[outer_width * outer_width - hole_width * hole_width] += 1

						return sum(1 for n in count.values() if 1 <= n <= 10   )


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






