Elementary number theory proofs

I am a freshman studying computer science, and I am supposed to solve this problem for my '(introduction to) elementary number theory' course. Could someone give me a hint or two on how to solve the following problem?

Prove that: If $$p$$ is a prime number ($$p=4\cdot n-1$$ where $$n$$ is a natural number) and $$x^2+y^2\equiv 0 \pmod{p}$$, then $$x\equiv 0 \pmod{p}$$ and $$y\equiv 0 \pmod{p}$$.

• No research at all? – Exzone Apr 16 at 16:48
• Do you know any group theory? (The question can be done without) – Mark Bennet Apr 16 at 16:49
• It would be helpful to give some context for your interest in this problem. Not knowing what you've studied may lead to Readers jumping in with short answers that are not within your grasp or elaborating a lot of background material that you are familiar with. – hardmath Apr 16 at 16:50
• What do you know about congruences modulo a prime, and what do you know about squares modulo a prime? What textbook are you using (if any) and what chapter are you in? What have you already covered in class? That’s the kind of context that is required to give you an appropriate answer. – Arturo Magidin Apr 16 at 18:02
• I've added the little context you provided in your Comment to the Question itself. Feel free to add more information there, or roll back the edit if it does not represent your meaning for any reason. It seems likely this exercise was assigned to reinforce and extend your understanding of Fermat's theorem on the sum of two squares. However nothing you've written indicates familiarity with that material. – hardmath Apr 17 at 0:06