Anika is hiking on a rectangular trail at the national park. There are four resting spots along the corners of the trail. On the map, they are marked with coordinates of (5, 2), (5, 4), (2, 4), and (2, 2). If each unit represents 1 mile, find the perimeter of the trail in miles, using the coordinates