A, B = map(int, input().split()) L = [] for i in range(A+1): for j in range(B+1): sum = 1*i + 5*j L.append(sum) S = set(L) Ss = sorted(S) for i in range(1, len(S)): print(Ss[i])