a, b = map(int, input().split()) prices = [] for i in range(a+1): for j in range(b+1): price = i + 5*j prices.append(price) prices = list(set(prices)) prices.sort() prices = prices[1:] for ans in prices: print(ans)