e_1,e_5 = map(int,input().split()) ans=set() for i in range(e_5+1): for j in range(e_1+1): A = 1 * j + 5 * i if A == 0: continue ans.add(A) for i in ans: print(i)