import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
prime(n);
}
public static void prime(int n) {
int i=2;
while(i<n) {
int flag=0;
int j=2;
while(j<i) {
if(i%j==0) {
flag=1;
break;
}
j=j+1;
}
if(flag==0) {
System.out.print(i+", ");
}
i=i+1;
}
}
}
---------output------- when n=18
2, 3, 5, 7, 11, 13, 17,