A, B = [int(i) for i in input().strip().split(' ')] lst = [] for i in range(A + 1): for j in range(B + 1): if i + j* 5 > 0: lst.append(i + j * 5) for i in list(set(lst)): print(i)