fill columns with coordinates
for ( auto i : A ) columns [ i [ 0 ] ] . push_back ( i [ 1 ] ) ; map < pair < int , int > , int > lastx ; int ans = INT_MAX ; for ( auto x : columns ) { vector < int > column = x . second ; sort ( column . begin ( ) , column . end ( ) ) ; for ( int j = 0 ; j < column . size ( ) ; j ++ ) { for ( int i = 0 ; i < j ; i ++ ) { int y1 = column [ i ] ;