import java.util.HashSet; import java.util.Scanner; public class Main { Scanner in = new Scanner(System.in); public void solve() { int a = in.nextInt(), b = in.nextInt(); HashSet set = new HashSet<>(); for (int i = 0; i <= a; i++) { for (int j = 0; j <= b; j++) { set.add(i + j * 5); } } Integer[] list = new Integer[set.size()]; set.toArray(list); for (int i = 0; i < list.length; i++) { if (list[i] != 0) System.out.println(list[i]); } } public static void main(String[] args) { new Main().solve(); } }