A, B = map(int, input().split()) ans = [] for i in range(B+1): for j in range(A+1): if i == j == 0: pass else: ans.append(i*5 + j*1) ans = sorted(set(ans)) for a in ans: print(a)