#let the limit be l
l = int(input("Enter the limit (integer):"))
#the function below checks if the function argument/parameter(n) is prime or not
def checkprime(n):
count = 0
for i in range(1,n+1):
if n%i == 0:
count+=1
if count == 2:
return 1
else:
return 0
print("The prime numbers upto",l)
for i in range(2,l+1):
if checkprime(i) == 1:
print(i)