In rectangle ABCD, the angle bisector of angle A intersects side DC at point M, and the angle bisector of angle C intersects side AB at point N. The length of CM is equal to the length of AM, and it is 6 inches longer than the length of DM. Find the perimeter of quadrilateral ANCM.