#include <bits/stdc++.h>
int main(void) {
  int a, b, c, d;
  scanf("%d", &a);
  for (b = 2; b <= a; b++) {
    d = 0;
    for (c = 2; c <= b; c++) {
      if (b % c == 0 && b != c) {
        d++;
        break;
      }
    }
    if (d == 0) {
      printf("%d\n", b);
    }
  }
  return 0;
}
