AIME I 2026 (Problem 14)

In an equiangular pentagon, the sum of the squares of the side lengths equals 308, and the sum of the squares of the diagonal lengths equals 800. The square of the perimeter of the pentagon can be expressed as mnm\sqrt n, where mm and nn are positive integers and nn is not divisible by the square of any prime. Find m+nm+n.