CPython lite logoProblemsContests

14. Prime Numbers #2

You are given a natural number n. Print all the prime numbers in the range of [1,n].


Input

In the first line, a natural number n(1n5105).

Output

All prime numbers should be printed on a single line, separated by spaces.


Sample input 1

10

Sample output 1

2 3 5 7

Login to be able to submit.

AdvancedAlgorithmsArrayLoops
396 / 162
Solved / unsolved count
0.5 s / 1024 MB
Limits