a, b = map(int, input().split()) pool = set() for c1 in range(a + 1): for c5 in range(b + 1): pool.add(c1 + c5 * 5) pooled = list(pool) pooled.sort() for p in pooled[1:]: print(p)