Find, with proof, all pairs of positive integers $(n, d)$ with the following property: for every integer $S$, there exists a unique non-decreasing sequence of n integers $a_1$, $a_2$, $\cdots$, $a_n$ such that $a_1 + a_2 + \cdots + a_n = S$ and $a_n-a_1 = d$.