Find the largest positive integer $n$ such that the following equations have integer solutions in $x, y_1, y_2, \ldots, y_n$:
\[
(x+1)^2 + y_1^2 = (x+2)^2 + y_2^2 = \ldots = (x+n)^2 + y_n^2.
\]

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