Hard
List the Primes
Read n and print all prime numbers up to n on one line, separated by spaces.
Input
One integer n ≥ 2.
Output
One line.
Sample 1
Input
20
Output
2 3 5 7 11 13 17 19
Sample 2
Input
2
Output
2
Output appears hereOne integer n ≥ 2.
One line.
20
2 3 5 7 11 13 17 19
2
2
Output appears here