This is a general problem solving marathon for members of Mymensingh Parallel Math School (MPMS). However, feel free to participate, even if you are not a member.

PROBLEM 1:

$p$ is a prime number of the form $4k+1$. Prove that there exists an integer $a$ so that $a^2+1$ is divisible by $p$.

PROBLEM 2:

For every pair of positive integers $(m, n)$, prove that there exists integers $x$, and $y$ such that not both of them are zero, $-\sqrt{n} \leq x \leq \sqrt{n}$, $-\sqrt{n} \leq y \leq \sqrt{n}$, and $x-my$ is divisible by $n$.

BONUS PROBLEM:

Prove that every prime $p$ of the form $4k+1$ can be written as a sum of two squares.

(This result is known as Fermat's Two Square Theorem)