Enigma 43: Scalenian squares

Scalenia is a country bounded by three straight frontiers – called A, B and C, of course – each of a different length but each an exact number of kilometres long. The curious thing is that the length of A+B+C, and the lengths of A+B−C, A+C−B and B+C−A are all precisely square numbers of kilometres.

If Scalenia has the smallest perimeter consistent with this curious fact, what is the length of each of its frontiers?