[ Linear inequalities and systems of inequalities ]

On each scale pan, $k$ weights numbered from 1 to $k$ were placed, and the left pan outweighed. It turned out that if any two weights with the same numbers are swapped between the pans, the right pan either starts to outweigh or the pans come into balance. For which $k$ is this possible?
Evaluation. Let $a_{i}$ be the mass of the $i$-th weight on the left pan, $b_{i}$ - on the right pan, $c_{i}=a_{i}-b_{i}$. Then the condition of the problem will take the form: $S=c_{1}+\ldots+c_{k}>0, S-2 c_{i} \leq 0$ for each $i$. Adding the inequalities $S-2 c_{1} \leq 0$ and $S-2 c_{2} \leq 0$, we get $c_{1}+c_{2} \geq S$. On the other hand, all numbers $c_{i}$ are positive (since they are greater than the positive number $S / 2$). Therefore, the total number of $c_{i}$ is no more than two, that is, $k \leq 2$.

Examples. For $k=1$, take $a_{1}=2, b_{1}=1$, and for $k=2$, take $a_{1}=a_{2}=2, b_{1}=b_{2}=1$.

## Answer

For $k=1,2$.