a,b = map(int, input().split()) s = {0} for i in range(b+1): for j in range(a+1): if i*5+j not in s: print(i*5+j) s |= {i*5+j}