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,\dfrac{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$?
$\textbf{(A)}\ 324 \qquad \textbf{(B)}\ 330 \qquad \textbf{(C)}\ 340 \qquad \textbf{(D)}\ 361 \qquad \textbf{(E)}\ 646$