Problem

Source: 2022 Thailand Onlline MO P7

Tags: number theory



Let $p$ be a prime number, and let $a_1, a_2, \dots , a_p$ and $b_1, b_2, \dots , b_p$ be $2p$ (not necessarily distinct) integers chosen from the set $\{1, 2, \dots , p - 1\}$. Prove that there exist integers $i$ and $j$ such that $1 \le i < j \le p$ and $p$ divides $a_ib_j-a_jb_i$.