





'''simple docstring'''






def      __A						(							a_						:  list[list[int]]      ,a_						:  int      ,a_						:  int      ,a_						:  set	):
		lowerCAmelCase	,		lowerCAmelCase     :    Optional[Any]						=   len(a_	), len(grid[0]	)
		if (
		    min(a_      ,a_	) < 0
		    or row == row_length
		    or col == col_length
		    or (row, col) in visit
		    or grid[row][col] == 1
		):
				return 0
		if row == row_length - 1 and col == col_length - 1:
				return 1

		visit.add((row, col)	)

		lowerCAmelCase     :    Dict						=   0
		count += depth_first_search(a_      ,row + 1      ,a_      ,a_	)
		count += depth_first_search(a_      ,row - 1      ,a_      ,a_	)
		count += depth_first_search(a_      ,a_      ,col + 1      ,a_	)
		count += depth_first_search(a_      ,a_      ,col - 1      ,a_	)

		visit.remove((row, col)	)
		return count


if __name__ == "__main__":
					import doctest

					doctest.testmod()










'''simple docstring'''






def      __A						(							a_						:  int	):
		if not isinstance(a_      ,a_	):
				lowerCAmelCase     :    Dict						=   f'''Input value of [number={number}] must be an integer'''
				raise TypeError(a_	)
		if number < 0:
				return False
		lowerCAmelCase     :    Dict						=   number * number
		while number > 0:
				if number % 1_0 != number_square % 1_0:
						return False
				number //= 1_0
				number_square //= 1_0
		return True


if __name__ == "__main__":
					import doctest

					doctest.testmod()



