



'''simple docstring'''




from __future__ import annotations



def 	a			( lowerCamelCase__    ):  # This function is recursive
			'''simple docstring'''





			A_	:						Union[str, Any]	=     len(lowerCamelCase__    )
			# If the array contains only one element, we return it (it's the stop condition of
			# recursion)
			if array_length <= 1:
						return array
						# Else
			A_	:						Any	=     array[0]
			A_	:						List[str]	=     False
			A_	:						str	=     1
			A_	:						list[int]	=     []
			while not is_found and i < array_length:
						if array[i] < pivot:
									A_	:						Any	=     True
									A_	:						Any	=     [element for element in array[i:] if element >= array[i]]
									A_	:						Union[str, Any]	=     longest_subsequence(lowerCamelCase__    )
									if len(lowerCamelCase__    ) > len(lowerCamelCase__    ):
												A_	:						Dict	=     temp_array
						else:
									i += 1

			A_	:						List[Any]	=     [element for element in array[1:] if element >= pivot]
			A_	:						Optional[int]	=     [pivot, *longest_subsequence(lowerCamelCase__    )]
			if len(lowerCamelCase__    ) > len(lowerCamelCase__    ):
						return temp_array
			else:
						return longest_subseq


if __name__ == "__main__":
						import doctest

						doctest.testmod()




'''simple docstring'''




from __future__ import annotations

import math



def 	a			( lowerCamelCase__    ):
			'''simple docstring'''





			if num <= 0:
						A_	:						List[Any]	=     f'{num}: Invalid input, please enter a positive integer.'
						raise ValueError(lowerCamelCase__    )

			A_	:						Dict	=     [True] * (num + 1)
			A_	:						List[Any]	=     []
			A_	:						Tuple	=     2
			A_	:						Optional[int]	=     int(math.sqrt(lowerCamelCase__    )    )

			while start <= end:
						# If start is a prime
						if sieve[start] is True:
									prime.append(lowerCamelCase__    )

									# Set multiples of start be False
									for i in range(start * start						,      num + 1						,      lowerCamelCase__    ):
												if sieve[i] is True:
															A_	:						List[Any]	=     False

						start += 1

			for j in range(end + 1						,      num + 1    ):
						if sieve[j] is True:
									prime.append(lowerCamelCase__    )

			return prime


if __name__ == "__main__":
						print(prime_sieve(int(input('''Enter a positive integer: ''').strip())))