Right Triangle with a Given Side

Source

I got a variant of this problem from Rustan Leino, who came up with it after being inspired by a problem from Madan Musuvathi.

I solved it and wrote up my solution.

Problem    

There's a simple technique that, given any integer $N > 2$, allows you to figure out the other two integer sides of a right triangle in your head (or with pen and paper if the numbers get too large). Find this technique.

Hints    
Solution     Reveal