a, b = [int(s) for s in input().split()] prices = [] for i in range(a + 1): for j in range(b + 1): if not (i == 0 and j == 0): if (i + 5 * j) not in prices: prices.append(i + 5 * j) prices.sort() for i in prices: print(i)