If the the given coordinates forms a diagonal of the square
else if ( Math . abs ( x2 - x1 ) == Math . abs ( y2 - y1 ) ) { System . out . print ( x1 + " , ▁ " + y2 + "NEW_LINE"); System . out . print ( x2 + " , ▁ " + y1 ) ; }