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+1): if i != 0 or j != 0: print(i*5+j)