import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); HashSet set = new HashSet(); for(int i = 0; i <= a; i++) { for(int j = 0; j <= b; j++) { if((i != 0) || (j != 0)) set.add(i + 5 * j); } } ArrayList list = new ArrayList(); Iterator it = set.iterator(); while(it.hasNext()) { list.add(it.next()); } Collections.sort(list); for(int i = 0; i < list.size(); i++) { System.out.println(list.get(i)); } } }