import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedHashSet; import java.util.Set; import static java.lang.System.in; public class No542 { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); int A = Integer.parseInt(inputs[0]); int B = Integer.parseInt(inputs[1]); Set set = new LinkedHashSet(); for (int b = 0; b <= B; b++) { for (int a = 0; a <= A; a++) { if (a + b > 0) { set.add(a + b * 5); } } } for (Object s : set) { System.out.println(s); } } }