import java.util.Scanner; import java.util.Set; import java.util.TreeSet; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); int B = scan.nextInt(); scan.close(); Set hash_set = new TreeSet(); int t = 0; for(int i = 0; i <= A; i++) { for(int j = 0; j <= B; j++) { t = i + 5 * j; hash_set.add(t); } } hash_set.remove(0); for(int i : hash_set) { System.out.println(i); } } }