
'''simple docstring'''





def   A			(							A_				:       int							):
						barcode //= 10  # exclude the last digit
						snake_case							:  Tuple			=     False
						snake_case							:  str			=     0

						# extract and check each digit
						while barcode != 0:
												snake_case							:  List[Any]			=     1 if checker else 3
												s += mult * (barcode % 10)
												barcode //= 10
												snake_case							:  Optional[int]			=     not checker

						return (10 - (s % 10)) % 10

def   A			(							A_				:       int							):
						return len(str(A_							)							) == 13 and get_check_digit(A_							) == barcode % 10

def   A			(							A_				:       str							):
						if str(A_							).isalpha():
												snake_case							:  Tuple			=     F"""Barcode '{barcode}' has alphabetic characters."""
												raise ValueError(A_							)
						elif int(A_							) < 0:
												raise ValueError('''The entered barcode has a negative value. Try again.'''							)
						else:
												return int(A_							)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						UpperCAmelCase            = get_barcode(input("Barcode: ").strip())

						if is_valid(barcode):
												print(f'''\'{barcode}\' is a valid barcode.''')
						else:
												print(f'''\'{barcode}\' is NOT a valid barcode.''')



'''simple docstring'''





from ..utils import DummyObject, requires_backends

class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					Any,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					Union[str, Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Union[str, Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					Optional[Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					Optional[Any],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					Union[str, Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					int,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[str],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[int],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					int   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Any,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					List[str],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Any,     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					Tuple,     **SCREAMING_SNAKE_CASE_						:					Optional[int]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Any   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					int,     *SCREAMING_SNAKE_CASE_						:					Any,     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					Dict,     **SCREAMING_SNAKE_CASE_						:					Optional[int]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Dict,     *SCREAMING_SNAKE_CASE_						:					Union[str, Any],     **SCREAMING_SNAKE_CASE_						:					Tuple   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Tuple,     *SCREAMING_SNAKE_CASE_						:					Optional[Any],     **SCREAMING_SNAKE_CASE_						:					Dict   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Union[str, Any],     *SCREAMING_SNAKE_CASE_						:					List[Any],     **SCREAMING_SNAKE_CASE_						:					str   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					str,     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					List[Any],     *SCREAMING_SNAKE_CASE_						:					str,     **SCREAMING_SNAKE_CASE_						:					Optional[Any]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Optional[Any],     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					Optional[int]   ):
										requires_backends(self,     ['''vision''']   )




class     a (					metaclass=__magic_name__     ):
				_snake_case		     =			['''vision''']




				def __init__(				self						:					Any,     *SCREAMING_SNAKE_CASE_						:					Optional[int],     **SCREAMING_SNAKE_CASE_						:					List[str]   ):
										requires_backends(self,     ['''vision''']   )

