import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int a=sc.nextInt();
int b=sc.nextInt();
int count=0;
boolean flag[]=new boolean[b+1]; //记录数的状态,默认都是素数
for(int i=...