a,b=map(int,input().split()) ans=sorted(list(set([i+5*j for i in range(a+1) for j in range(b+1)])))[1:] print("\n".join([str(x) for x in ans]))