if the square is largest then store it
if ( side < abs ( points [ i ] [ 0 ] - points [ j ] [ 0 ] ) || ( side == abs ( points [ i ] [ 0 ] - points [ j ] [ 0 ] ) && ( ( points [ i ] [ 0 ] * points [ i ] [ 0 ] + points [ i ] [ 1 ] * points [ i ] [ 1 ] ) < ( x * x + y * y ) ) ) ) { x = points [ i ] [ 0 ] ; y = points [ i ] [ 1 ] ; side = abs ( points [ i ] [ 0 ] - points [ j ] [ 0 ] ) ; } } }