5. (IMO-29 Preliminary Question) If $r$ is the remainder when 1059, 1417, and 2312 are divided by $d$, where $d$ is an integer greater than 1, find the value of $d-r$.


5. Given $1059 \equiv 1417 \equiv 2312(\bmod d)$, then
$$
\begin{array}{l}
d \mid 2312-1417=895, \\
d \mid 1417-1059=358 .
\end{array}
$$

And $(895,358)=179$, so we have $d \mid 179$.
Since 179 is a prime number, $d>1$, thus
$$
d=179 \text {. }
$$

From $1059=179 \cdot 5+164$, we get $r=164$.
$$
d-r=179-164=15
$$