a, b = map(int, input().strip().split(" ")) price = list(set([i + j*5 for i in range(a+1) for j in range(b+1)])) for i in sorted(price)[1:]: print(i)