Pregunta de entrevista de Booking.com

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