A,B=map(int,input().split()) s=set() for i in range(B+1): for j in range(A+1): s.add(5*i+j) s=list(s);s.sort() for i in range(1,len(s)): print(s[i])