How to prove Sum of squares of $n$ numbers is unique

I was solving a programming problem where I needed to prove that sum of squares of $n$ numbers is unique. i. e. if calculate the sum of squares of equal number of positive integers then if they are same it means that all numbers are the same.

How do I prove it?

The range of numbers is between 0 and 127(inclusive)
or does the range matter?

-
But $7^2+1^2=5^2+5^2$ ! –  Hagen von Eitzen Jul 20 '13 at 13:41
Or even $3^2+4^2 = 5^2+0^2$ –  TZakrevskiy Jul 20 '13 at 13:42
Sure, $11^2+2^2=10^2+5^2$ or $7^2+4^2=8^2+1^2$ –  Hagen von Eitzen Jul 20 '13 at 13:43
@HagenvonEitzen ah, that is more satisfying. And now I see how such examples are easily found: $a^2+b^2=c^2+d^2$ is equivalent to $(a-c)(a+c)=(d-b)(b+d)$, so you just look for two different factorizations of a number. –  Harald Hanche-Olsen Jul 20 '13 at 13:44
Find here(mathworld.wolfram.com/SumofSquaresFunction.html) for the number of representations of an sum of squares –  lab bhattacharjee Jul 20 '13 at 13:49