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 <= a; i++) { for (int j = 0; j <= b; j++) { if (i == 0 && j == 0){ continue; } set.add(i * 1 + j * 5); } } StringBuilder sb = new StringBuilder(); for (Integer x : set) { sb.append(x).append("\n"); } System.out.print(sb); } }