Let $n$ be an integer such that $1 \leqslant n \leqslant 30$. Ariane and Bérénice play the following game. First, Ariane chooses $n$ distinct numbers from the integers $1, 2, \ldots, 30$. Then, and in view of Ariane's choices, Bérénice chooses an integer $d \geqslant 2$. Bérénice wins if $d$ divides at least two of the numbers chosen by Ariane. Otherwise, Ariane wins.

For which values of $n$ can Ariane ensure her victory?
First, if $n \leqslant 11$, Ariane ensures her victory by choosing $n$ integers from $1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29$. Indeed, these are the integer 1 and the 10 prime numbers less than or equal to 30. Consequently, the $n$ numbers chosen by Ariane are pairwise coprime, and no integer $d \geqslant 2$ that Bérénice chooses will divide two of the numbers chosen by Ariane.

On the contrary, if $n \geqslant 12$, Bérénice can manage to win. To do this, she groups the integers $1, 2, \ldots, 30$ into 11 drawers. Each drawer is associated with a prime number $p \leqslant 30$, and contains the set of integers $k \leqslant 30$ for which $p$ is the smallest prime factor, or the integer 1, which contains only the integer 1 itself. Since Bérénice has 11 drawers, two of the $n$ numbers chosen by Ariane, say $a$ and $b$, belong to the same drawer. This drawer contains at least two integers, so it cannot be associated with the integer 1. It is therefore associated with a prime number $p$, which is then necessarily the smallest prime factor of $a$ and $b$. Consequently, Bérénice only needs to choose $d=p$ to ensure her victory.

Remark: In general, regardless of the values of $n$ and the choices made by Ariane, Bérénice can even restrict herself to choosing $d=2, 3$, or 5. Indeed, if a composite number $k$ belongs to the drawer associated with a prime number $p$, the integer $k / p$ is greater than 1, and has no prime factor less than $p$, so it is at least $p$. This means that $p^{2} \leqslant p \times (k / p) = k \leqslant 30 < 6^{2}$, i.e., $p \leqslant 5$. Therefore, only the drawers associated with the prime numbers $p=2, 3$, or 5 contain at least two integers, and Bérénice will choose $d$ equal to one of these three prime numbers.