ones, fives = map(int, input().split()) answers = set() for five in range(fives + 1): for one in range(ones + 1): answers.add(one + 5 * five) for answer in sorted(answers): if answer != 0: print(answer)