




import math





def 						__A						(      __lowerCamelCase       ) ->			list[int]:
	a									=				[]
	a									=				2
	a									=				int(math.sqrt(__lowerCamelCase       )       )  # Size of every segment
	a									=				[True] * (end + 1)
	a									=				[]

	while start <= end:
		if temp[start] is True:
			in_prime.append(__lowerCamelCase       )
			for i in range(start * start				,     end + 1				,     __lowerCamelCase       ):
				a									=				False
		start += 1
	prime += in_prime

	a									=				end + 1
	a									=				min(2 * end				,     __lowerCamelCase       )

	while low <= n:
		a									=				[True] * (high - low + 1)
		for each in in_prime:
			a									=				math.floor(low / each       ) * each
			if t < low:
				t += each

			for j in range(__lowerCamelCase				,     high + 1				,     __lowerCamelCase       ):
				a									=				False

		for j in range(len(__lowerCamelCase       )       ):
			if temp[j] is True:
				prime.append(j + low       )

		a									=				high + 1
		a									=				min(high + end				,     __lowerCamelCase       )

	return prime



print(sieve(10**6))







import operator as op


__UpperCamelCase   :			Optional[Any]          = "scaler.pt"
__UpperCamelCase   :			Optional[Any]          = "pytorch_model"
__UpperCamelCase   :			str          = "random_states"
__UpperCamelCase   :			Optional[int]          = "optimizer"
__UpperCamelCase   :			Optional[int]          = "scheduler"
__UpperCamelCase   :			str          = "pytorch_model.bin"
__UpperCamelCase   :			List[str]          = "pytorch_model.bin.index.json"
__UpperCamelCase   :			List[str]          = "model.safetensors"
__UpperCamelCase   :			Optional[int]          = "model.safetensors.index.json"
__UpperCamelCase   :			List[str]          = "1.10.2"
__UpperCamelCase   :			Dict          = "py38"
__UpperCamelCase   :			List[str]          = "4.17.0"
__UpperCamelCase   :			Any          = ["ml.p3.16xlarge", "ml.p3dn.24xlarge", "ml.p4dn.24xlarge"]
__UpperCamelCase   :			Any          = ["FULL_SHARD", "SHARD_GRAD_OP", "NO_SHARD", "HYBRID_SHARD", "HYBRID_SHARD_ZERO2"]
__UpperCamelCase   :			int          = ["TRANSFORMER_BASED_WRAP", "SIZE_BASED_WRAP", "NO_WRAP"]
__UpperCamelCase   :			Dict          = ["BACKWARD_PRE", "BACKWARD_POST", "NO_PREFETCH"]
__UpperCamelCase   :			str          = ["FULL_STATE_DICT", "LOCAL_STATE_DICT", "SHARDED_STATE_DICT"]
__UpperCamelCase   :			List[Any]          = "2.0.1"
__UpperCamelCase   :			int          = ["pdsh", "standard", "openmpi", "mvapich"]
__UpperCamelCase   :			List[str]          = ["default", "reduce-overhead", "max-autotune"]

__UpperCamelCase   :			List[Any]          = {">": op.gt, ">=": op.ge, "==": op.eq, "!=": op.ne, "<=": op.le, "<": op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
__UpperCamelCase   :			List[Any]          = [
    "nnodes",
    "nproc_per_node",
    "rdzv_backend",
    "rdzv_endpoint",
    "rdzv_id",
    "rdzv_conf",
    "standalone",
    "max_restarts",
    "monitor_interval",
    "start_method",
    "role",
    "module",
    "m",
    "no_python",
    "run_path",
    "log_dir",
    "r",
    "redirects",
    "t",
    "tee",
    "node_rank",
    "master_addr",
    "master_port",
]

__UpperCamelCase   :			List[str]          = ["DEEPSPEED", "MULTI_GPU", "FSDP", "MEGATRON_LM"]
__UpperCamelCase   :			int          = ["DEEPSPEED", "MULTI_XPU", "FSDP"]

