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