






"""simple docstring"""







from __future__ import annotations

import math


def      UpperCamelCase       ( _A )     ->       list[int]:

				if num <= 0:
								lowercase    :      Tuple       = F"""{num}: Invalid input, please enter a positive integer."""
								raise ValueError(_A )

				lowercase    :      Tuple       = [True] * (num + 1)
				lowercase    :      Any       = []
				lowercase    :      Tuple       = 2
				lowercase    :      int       = int(math.sqrt(_A ) )

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

												# Set multiples of start be False
												for i in range(start * start  ,				num + 1  ,				_A ):
																if sieve[i] is True:
																				lowercase    :      Optional[int]       = False

								start += 1

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

				return prime


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








"""simple docstring"""







def      UpperCamelCase       ( _A  ,				_A )     ->       None:
				lowercase    :      List[Any]       = len(_A )
				print("""The following activities are selected:""" )

				# The first activity is always selected
				lowercase    :      Optional[int]       = 0
				print(_A  ,				end=""",""" )

				# Consider rest of the activities
				for j in range(_A ):
								# If this activity has start time greater than
								# or equal to the finish time of previously
								# selected activity, then select it
								if start[j] >= finish[i]:
												print(_A  ,				end=""",""" )
												lowercase    :      str       = j


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				_lowerCAmelCase            =	[1, 3, 0, 5, 8, 5]
				_lowerCAmelCase            =	[2, 4, 6, 7, 9, 9]
				print_max_activities(start, finish)
