CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #764 #766 →

#765. Primes up to n

You are given n. Print all prime numbers not greater than n on one line. ### Input One integer n (2 ≤ n ≤ 500). ### Output One line.

Examples

Input
170
Output
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167
Input
71
Output
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!