#include <math.h>
#include <stdbool.h>
#include <stdio.h>

bool is_prime(int number) {
  for (int i = 2; i <= sqrt(number); i++) {
    if (0 == number % i) {
      return false;
    }
  }
  return true;
}

int main() {
  int max_number = 100000;
  for (int i = 2; i <= max_number; ++i) { // max_number * sqrt(max_number)
    if (is_prime(i)) {
      printf("%d\n", i);
    }
  }
  return 0;
}
