Three. (50 points)
Let $M$ be a point on the coordinate plane with coordinates $(p \cdot 2002, 7p \cdot 2002)$, where $p$ is a prime number. Find the number of right triangles that satisfy the following conditions:
1. The three vertices of the triangle are integer points, and $M$ is the right-angle vertex;
2. The incenter of the triangle is the origin of the coordinates.
Three, (50 points)
Regarding the center $Q$ of $O M$, the right-angled triangle that satisfies the condition becomes a right-angled triangle $O A B$ with $O$ as the right-angle vertex and $M$ as the incenter, and $A$ and $B$ are still integer points.

The slope of the line $O M$ is $\tan \beta=7$, the slope of the line $O A$ is $\tan \alpha=\tan (\beta-45^{\circ})=\frac{\tan \beta-1}{1+\tan \beta}=\frac{3}{4}$, and the slope of the line $O B$ is $-\frac{4}{3}$.

Thus, we can set the coordinates of point $A$ as $(4 t, 3 t)$, and the coordinates of point $B$ as $(-3 s, 4 s)$, so $t=4 t-3 t, s=-3 s+4 s$ are both integers.
Let the inradius of $\triangle A B C$ be $r$, then
$$
r=\frac{\sqrt{2}}{2} O M=\frac{\sqrt{2}}{2} p \cdot 2002 \cdot \sqrt{1^{2}+7^{2}}=5 p \cdot 2002.
$$

Also, $O A=5 t, O B=5 s, A B=5 \sqrt{t^{2}+s^{2}}, O A+O B-A B=2 r$,
so $5 \sqrt{t^{2}+s^{2}}=5 t+5 s-2 \cdot 5 p \cdot 2002$,
which simplifies to $t^{2}+s^{2}=(t+s)^{2}-4 p \cdot 2002 \cdot(t+s)+4 p^{2} \cdot 2002$.
Rearranging gives $(t-4004 p)(s-4004 p)=2 p^{2} \cdot 2002^{2}=2^{3} \cdot 7^{2} \cdot 11^{2} \cdot 13^{2} \cdot p^{2}$,
Since $5 t>2 r ; 5 s>2 r$, we have $t-4004 p>0, s-4004 p>0$.
Therefore, the number of triangles that meet the condition is equal to the number of positive divisors of $2^{3} \cdot 7^{2} \cdot 11^{2} \cdot 13^{2} \cdot p^{2}$.
Thus, when $p \neq 2,7,11,13$, there are $(3+1)(2+1)(2+1)(2+1)(2+1)=324$ right-angled triangles that meet the condition;

When $p=2$, there are $(5+1)(2+1)(2+1)(2+1)=162$ right-angled triangles that meet the condition;

When $p=7$ or 11 or 13, there are $(3+1)(4+1)(2+1)(2+1)=180$ right-angled triangles that meet the condition.