import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args){ new Main(); } private boolean primes[]; public Main(){ Scanner sc = new Scanner(System.in); primes = new boolean[10001]; Arrays.fill(primes, true); primes[0] = primes[1] = false; for(int i=2;i