import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int one = sc.nextInt(); int five = sc.nextInt(); int max = 0; for (int i=0; i<=five; i++) { for (int j=0; j<=one; j++) { if (i==0&&j==0 || 5*i+j<=max) {continue;} System.out.println(5*i+j); if (j==one) {max = 5*i+j;} } } } }