2008 Peru Iberoamerican Team Selection Test

P1

For every integer $m>1$, let $p(m)$ be the least prime divisor of $m$. If $a$ and $b$ are integers greater than $1$ such that: $$a^2+b=p(a)+[p(b)]^2$$Show that $a=b$

P2

Let $ ABCD$ be a convex quadrilateral and let $ P$ and $ Q$ be points in $ ABCD$ such that $ PQDA$ and $ QPBC$ are cyclic quadrilaterals. Suppose that there exists a point $ E$ on the line segment $ PQ$ such that $ \angle PAE = \angle QDE$ and $ \angle PBE = \angle QCE$. Show that the quadrilateral $ ABCD$ is cyclic. Proposed by John Cuya, Peru

P3

In the coordinate plane consider the set $ S$ of all points with integer coordinates. For a positive integer $ k$, two distinct points $A$, $ B\in S$ will be called $ k$-friends if there is a point $ C\in S$ such that the area of the triangle $ ABC$ is equal to $ k$. A set $ T\subset S$ will be called $ k$-clique if every two points in $ T$ are $ k$-friends. Find the least positive integer $ k$ for which there exits a $ k$-clique with more than 200 elements. Proposed by Jorge Tipe, Peru