Problem

Source: Kazakhstan Junior National Olympiad 2022, Problem 2

Tags: Kazakhstan, Kazakhstan 2022, number theory proposed, number theory, prime numbers



Given a prime number $p$. It is known that for each integer $a$ such that $1<a<p/2$ there exist integer $b$ such that $p/2<b<p$ and $p|ab-1$. Find all such $p$.