
from maths.prime_check import is_prime




def 	UpperCAmelCase   (						_lowerCamelCase    ):
			if not isinstance(_lowerCamelCase ,    _lowerCamelCase    ):
						A							:					Optional[Any]              =						f"""Input value of [number={number}] must be an integer"""
						raise TypeError(_lowerCamelCase    )
			if is_prime(_lowerCamelCase    ) and is_prime(number + 2    ):
						return number + 2
			else:
						return -1


if __name__ == "__main__":
							import doctest

							doctest.testmod()




from collections.abc import Sequence




def 	UpperCAmelCase   (						_lowerCamelCase = None    ):
			if nums is None or not nums:
						raise ValueError("Input sequence should not be empty"    )

			A							:					Dict              =						nums[0]
			for i in range(1 ,    len(_lowerCamelCase    )    ):
						A							:					Tuple              =						nums[i]
						A							:					List[Any]              =						max(_lowerCamelCase ,    ans + num ,    _lowerCamelCase    )

			return ans


if __name__ == "__main__":
							import doctest

							doctest.testmod()

							# Try on a sample input from the user
							__SCREAMING_SNAKE_CASE           =  int(input("""Enter number of elements : """).strip())
							__SCREAMING_SNAKE_CASE           =  list(map(int, input("""\nEnter the numbers : """).strip().split()))[:n]
							print(max_subsequence_sum(array))