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(); TreeSet set = new TreeSet<>(); for (int i = 0; i <= b; i++) { for (int j = 0; j <= a; j++) { set.add(i * 5 + j); } } // 合計値が0のものを排除s set.remove(0); StringBuilder sb = new StringBuilder(); for (int x : set) { sb.append(x).append("\n"); } System.out.print(sb); } }