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(); boolean [] boo = new boolean [601]; for(int i=0; i<=B; i++){ for(int j=0; j<=A; j++){ int tmp = i*5+j; boo[tmp] = true; } } for(int i=1; i<=600; i++){ if(boo[i])System.out.println(i); } } }