A certain triangle has a perimeter of 3065 mi. The shortest side measures 79 mi less than the middle​ side, and the longest side measures 372mi more than the middle side. Find the lengths of the three sides