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