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