Function that return the coordinates of the fourth vertex of the rectangle
function findFourthVertex ( n , m , s ) { var row = new Map ( ) , col = new Map ( ) ; for ( var i = 0 ; i < n ; i ++ ) for ( var j = 0 ; j < m ; j ++ )