A triangle has side lengths $7,$ $8$, and $9.$ There are exactly two lines that simultaneously bisect the perimeter and area of the triangle. Let $\theta$ be the acute angle between these two lines. Find $\tan \theta.$

The answer is 4*sqrt(7) + 2*sqrt(5).