Two non-congruent inter-sided isosceles triangles have the same perimeter and the same area. The ratio of the lengths of the bases of the two triangles is 8:7. Find the minimum possible value of their common perimeter.

When I did, I got a very ugly radical, but AIME answers are always whole numbers. Solution please?