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