Booking.com Interview Question

Polygons: Identify whether four sides can form a square, a rectangle or neither.