Find all prime numbers $p$ such that there exist positive integers $x$ and $y$ satisfying the following system of equations:
\[
\begin{cases}
  p + 49 = 2x^2 \\
  p^2 + 49 = 2y^2
\end{cases}
\]

Let's think step by step and output the final answer within \boxed{}.
user