Question 21
Mary chose an even $4$-digit number $n.$ She wrote down all the divisors of $n$ in increasing order from left to right: $1,$ $2,$ $\ldots,$ $\frac{n}{2},$ $n.$ At some moment Mary wrote $323$ as a divisor of $n.$ What is the smallest possible value of the next divisor written to the right of $323?$