Maximum integral co | Making set of coordinates such that any two points are non - integral distance apart ; used to avoid duplicates in result ; Driver function
function printSet ( x , y ) { arr = [ ] ; for ( let i = 0 ; i <= Math . min ( x , y ) ; i ++ ) { let pq = [ i , Math . min ( x , y ) - i ] ; arr . push ( pq ) ; } for ( let [ key , value ] of arr . entries ( ) ) { document . write ( value [ 0 ] + " " + value [ 1 ] + " " ) } } let x = 4 ; let y = 4 ; printSet ( x , y )