a²+b²+c²-ab-bc-ac
=(2a²+2b²+2c²-2ab-2bc-2ac)/2
=[(a²-2ab+b²)+(b²-2bc+c²)+(c²-2ac+a²)]/2
=[(a-b)²+(b-c)²+(c-a)²]/2