A, B = map(int, input().split()) L = [] for i in range(A+1): for j in range(B+1): L.append(i+j*5) print('\n'.join(map(str, set(L[1:]))))