import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); boolean S[] = new boolean[100000]; S[0] = true; int res = 0; for(int i=0; i<=B; i++){ for(int j=0; j<=A; j++){ res = 5*i+1*j; if(S[res]==false) System.out.println(res); S[res]=true; } } } }