from itertools import combinations as com coin1,coin5 = map(int,input().split()) if coin1 and coin5: prices = set() for i in range(coin1 + 1): for j in range(coin5 + 1): p = i + 5 * j if p: prices.add(p) print("\n".join(map(str,sorted(prices)))) elif coin1: for i in range(1,coin1 + 1): print(i) else: for i in range(1,coin5 + 1): print(i * 5)