Check for every two points in the same vertical line
for ( auto line : vertical ) { int X1 = line . first ; vector < int > yList = line . second ; for ( int i = 0 ; i < yList . size ( ) ; i ++ ) { int Y1 = yList [ i ] ; for ( int j = i + 1 ; j < yList . size ( ) ; j ++ ) { int Y2 = yList [ j ] ; int side = abs ( Y1 - Y2 ) ; int X2 = X1 + side ;