import java.io.*; import java.util.*; public class Main_yukicoder542 { private static Scanner sc; private static Printer pr; private static void solve() { int a = sc.nextInt(); int b = sc.nextInt(); Set hs = new TreeSet<>(); for (int i = 0; i <= b; i++) { for (int j = 0; j <= a; j++) { hs.add(i * 5 + j); } } hs.remove(Integer.valueOf(0)); for (int e : hs) { pr.println(e); } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }