package yukicoder; import java.util.*; public class P542 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); Set s = new TreeSet<>(); for(int i=0; i<=A; i++) { for(int j=0; j<=B; j++) { if(i==0&&j==0) continue; s.add(i+5*j); } } for(int x : s) { System.out.println(x); } } }