A, B = map(int, input().split()) L = set([a+5*b for a in range(A+1) for b in range(B+1) if a+5*b != 0]) print('\n'.join(map(str, L)))