title: Find number of rectangles from a given set of coordinates
body: <p>I have to find max number of rectangles from a given set of coordinates. </p>
  
  <p>Consider the following coordinates are given in an X Y coordinate system
  3 10,
  3 8,
  3 6,
  3 4,
  3 0,
  6 0,
  6 4,
  6 8,
  6 10,</p>
  
  <p>How can I find if the following coordinates form a rectangle (3,0) (3,4)  (6,4)  (6,0)</p>
  
  <p>Running time constraint: 0.1 sec</p>
  
  <p>Thank you</p>