# Factorial and square number

$\large \begin{cases} p!+1= (2p+1)^{2} \\ q!+1=(10q+p-4)^{2} \end{cases}$

Let $$p$$ and $$q$$ be prime numbers satisfying the system of equations above. Find $$p + q$$.

Hint: You may find Wilson's theorem useful.

Notation: $$!$$ denotes the factorial notation. For example, $$8! = 1\times2\times3\times\cdots\times8$$.

×