import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; import java.util.TreeSet; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int A = sc.nextInt(); final int B = sc.nextInt(); TreeSet set = new TreeSet(); for(int b = 0; b <= B; b++){ for(int a = 0; a <= A; a++){ final int money = b * 5 + a; if(money == 0){ continue; } set.add(money); } } for(final int money : set){ System.out.println(money); } } }