a,b = map(int,input().split())
if a >= 5:
	for i in range(a+b*5):
		print(i+1)
else:
	for i in range(b+1):
		for j in range(a):
			print(i*5+j+1)