a, b = map(int,input().split()) c = {i*1+j*5 for i in range(a+1) for j in range(b+1)} c.remove(0) c = sorted(list(c)) for e in c: print(e)