A,B=map(int,input().split()) Z=set([0]) for x in [1]*A+[5]*B:Z.update([z+x for z in Z]) [print(i) for i in sorted(list(Z)) if i]