The center of the circle inscribed in a quadrilateral lies on its diagonal, which is equal to 5. It is known that the perimeter of the quadrilateral is 14, and the area is 12. Find the second diagonal and the sides of the quadrilateral.