a,b=map(int,input().split()) c=set() for i in range(a+1): for j in range(b+1): c.add(1*i+5*j) c=sorted(c) print(*c[1:],sep="\n")