import java.util.HashSet; import java.util.Scanner; import java.util.stream.IntStream; public class Main{ static IntStream REPS(int v){return IntStream.range(0,v);} static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);} static IntStream INS(int n) {return REPS(n).map(i->getInt());} static Scanner s=new Scanner(System.in); static int getInt(){return Integer.parseInt(s.next());} public static void main(String[]$){ int one=getInt(),five=getInt(); HashSetr=new HashSet<>(); for(int i=0;i<=five;++i) for(int j=0;j<=one;++j) r.add(i*5+j); r.remove(0); r.stream().sorted().forEach(System.out::println); } }