In a convex quadrilateral \(ABCD\), all the triangles \(\triangle ABC\), \(\triangle BCD\), \(\triangle CDA\) and \(\triangle DAB\) have equal perimeters. Show that \(ABCD\) is a rectangle.