inp = input().split() num = [int(s) for s in inp] list = [] for i in range(num[0]+1): for j in range(num[1]+1): list.append(i + 5*j) list.sort() list.remove(0) for i in list: print(i)