import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; public class Main { public static void main(String[] args) { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); try { int N = Integer.parseInt(stdReader.readLine()); boolean[] dp = new boolean[N+1]; boolean[] prime = new boolean[N+1]; ArrayList primeList = new ArrayList<>(); Arrays.fill(prime, true); prime[0] = false; prime[1] = false; for(int i=2;i