import sys input = sys.stdin.readline ones, fives = map(int, input().split()) maxValue = ones + 5 * fives for i in range(1, maxValue + 1): if i % 5 <= ones: print(i)