Assume $N$ and $M=(N-1)/2$ are both prime. For any $L(L\leq N)$ different integers $1\leq i_1<i_2<\ldots<i_L \leq N$, denote $A_m(i_1,\ldots,i_L)$, $1\leq m \leq M$ to be the number of pairwise $(i_k,i_l)$ such that $i_k-i_l = \pm m \mod M$, i.e., $$A_m(i_1,\ldots,i_L) = |\{(l,k):l<k, i_k-i_l = \pm m \mod M\}|$$
I conjecture that for any $L(1\leq L\leq N)$ different integers $1\leq i_1<i_2<\ldots<i_L \leq N$, and for any $1\leq m \leq M$, there always exists an $1\leq n \leq M$, so that $n \neq m$, and $|A_n(i_1,\ldots,i_L) - A_m(i_1,\ldots,i_L)|\leq 1$.
Here are two examples,
1) $N=5$, $M=2$. I list all possible $\{A_1(i_1,\ldots,i_L),\ldots, A_M(i_1,\ldots,i_L)\}$ as belows: \begin{align} \left\{\left\{\begin{matrix}0\\0\end{matrix} \right\},\left\{\begin{matrix}3\\3\end{matrix} \right\},\left\{\begin{matrix}1\\2\end{matrix} \right\},\left\{\begin{matrix}1\\0\end{matrix} \right\},\left\{\begin{matrix}5\\5\end{matrix} \right\} \right\} \end{align}
2) $N=7$, $M=3$. All possible $\{A_1(i_1,\ldots,i_L),\ldots, A_M(i_1,\ldots,i_L)\}$ are as belows: \begin{align} \left\{ \left\{\begin{matrix} 0\\0\\0 \end{matrix}\right\}, \left\{\begin{matrix} 2\\2\\2\end{matrix}\right\}, \left\{\begin{matrix} 5\\5\\5\end{matrix}\right\}, \left\{\begin{matrix} 1\\1\\1\end{matrix}\right\}, \left\{\begin{matrix} 7\\7\\7\end{matrix}\right\}, \left\{\begin{matrix} 3\\3\\4\end{matrix}\right\}, \left\{\begin{matrix} 3\\2\\1\end{matrix}\right\}, \left\{\begin{matrix} 2\\0\\1\end{matrix}\right\}, \left\{\begin{matrix} 1\\0\\0\end{matrix}\right\} \right\}, \end{align}
We can see the conjecture is right in these two cases. I also testify it in the case $N=11$, $M=5$. However, I have no idea to prove it. Does anyone know how to deal with it? Thanks!