/**
* @param args
*找出比你输入的数字小的所有质数
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s = new Scanner(System.in);
int a = s.nextInt();
ZhiShu(a);
}
public static void ZhiShu(int a){
TreeSet<Integer> al = new TreeSet<>();
if (a == 1) {
System.out.println("不是质数也不是合数");
}
if (a == 2) {
System.out.println("其本身为质数且没有比它小的质数");
}
for(int x = 3;x <= a;x++){
for(int y =2;y <= x-1;y++){
if(x%y == 0){
continue;
}else{
al.add(x);
}
}
}
for (Iterator iterator = al.iterator(); iterator.hasNext();) {
System.out.println(iterator.next());
}
}