Problem C

Three Perimeters

A *median* is a line segment drawn from the vertex of a triangle to the midpoint of the opposite side.

In \(\triangle DEF\), a median is drawn from vertex \(D\), meeting side \(EF\) at point \(M\).

The perimeter of \(\triangle DEF\) is \(24\). The perimeter of \(\triangle DEM\) is \(18\). The perimeter \(\triangle DFM\) is \(16\). Determine the length of the median \(DM\).

**Themes:** Algebra, Geometry & Measurement