A, B = map(int, input().split()) list1 = [] a = 0 for i in range(B+1): a = i*5 if a != 0: list1.append(a) for i in range(A): a = a+1 list1.append(a) list2 = list(set(list1)) C = sorted(list2) for i in range(len(C)): print(C[i])