public class Exec { public static void main(String args[]) { for (int i = 1; i <= 1000000; i += 2) { boolean flag = true;
for (int j = 2; j < Math.sqrt(i); j++) { if (i % j == 0) { flag = false; break; } }
if (flag) System.out.println(i); }
}}