Anton and Britta play a game with the set $M=\left \{ 1,2,\dots,n-1 \right \}$ where $n \geq 5$ is an odd integer. In each step Anton removes a number from $M$ and puts it in his set $A$, and Britta removes a number from $M$ and puts it in her set $B$ (both $A$ and $B$ are empty to begin with). When $M$ is empty, Anton picks two distinct numbers $x_1, x_2$ from $A$ and shows them to Britta. Britta then picks two distinct numbers $y_1, y_2$ from $B$. Britta wins if
$(x_1x_2(x_1-y_1)(x_2-y_2))^{\frac{n-1}{2}}\equiv 1\mod n$
otherwise Anton wins. Find all $n$ for which Britta has a winning strategy.
1. **Case 1: \( n \) is not a prime number**

   If \( n \) is not a prime number, then \( n \) has a prime divisor \( q \). Anton can choose this prime divisor \( q \) on his first move. At the end of the game, Anton can choose \( x_1 = q \) and any other number \( x_2 \) from his set \( A \). Since \( q \) is a prime divisor of \( n \), we have:
   \[
   q^{\frac{n-1}{2}} \equiv 0 \pmod{n}
   \]
   This means that the expression \( (x_1 x_2 (x_1 - y_1) (x_2 - y_2))^{\frac{n-1}{2}} \) will be congruent to 0 modulo \( n \), which is not congruent to 1. Therefore, Anton wins in this case.

2. **Case 2: \( n = p \), where \( p \) is a prime number**

   If \( n \) is a prime number \( p \), Britta can follow a specific strategy to ensure her win. The strategy is as follows:
   - If Anton chooses a number \( t \) from \( M \), Britta will choose \( p - t \) from \( M \).
   - Since \( p - 1 \) is even and Anton starts the game, Britta can always follow this strategy until the end of the game.

   At the end of the game, when Anton picks \( x_1 \) and \( x_2 \) from his set \( A \), Britta will pick \( y_1 = p - x_1 \) and \( y_2 = p - x_2 \) from her set \( B \). We need to evaluate the expression:
   \[
   (x_1 x_2 (x_1 - y_1) (x_2 - y_2))^{\frac{p-1}{2}}
   \]
   Substituting \( y_1 = p - x_1 \) and \( y_2 = p - x_2 \), we get:
   \[
   (x_1 x_2 (x_1 - (p - x_1)) (x_2 - (p - x_2)))^{\frac{p-1}{2}} = (x_1 x_2 (2x_1 - p) (2x_2 - p))^{\frac{p-1}{2}}
   \]
   Since \( x_1 \) and \( x_2 \) are elements of \( \{1, 2, \ldots, p-1\} \), and \( p \) is a prime number, we have:
   \[
   (x_1 x_2 (2x_1 - p) (2x_2 - p))^{\frac{p-1}{2}} \equiv (2x_1 x_2)^{p-1} \equiv 1 \pmod{p}
   \]
   This is because \( (2x_1 x_2)^{p-1} \equiv 1 \pmod{p} \) by Fermat's Little Theorem, which states that for any integer \( a \) not divisible by a prime \( p \), \( a^{p-1} \equiv 1 \pmod{p} \).

   Therefore, Britta wins when \( n \) is a prime number.

Conclusion:
Britta has a winning strategy if and only if \( n \) is a prime number.

The final answer is \( \boxed{ n } \) is a prime number.