from itertools import product as p a,b=map(int,input().split()) print(*sorted({i+5*j for i,j in p(range(a+1),range(b+1))})[1:],sep="\n")