@aditya74: thanks for the solution! It is a nice one. It could be improved to cover a corner case where two points are the same while the other two points are also the same but different from the first two points, e.g.,

[0,0] [0,1] [0,1] [0,0]

Hopefully the author could add such kind of cases.
This case should result in False, as two sides are zero length.