For a natural number $p$, one can move between two points with integer coordinates if the distance between them equals $p$. Find all prime numbers $p$ for which it is possible to reach the point $(2002,38)$ starting from the origin $(0,0)$.
Source: Mongolian MO 2002 Grade 10 P2
Tags: geometry, number theory
For a natural number $p$, one can move between two points with integer coordinates if the distance between them equals $p$. Find all prime numbers $p$ for which it is possible to reach the point $(2002,38)$ starting from the origin $(0,0)$.