Consider three lines as follows.
If these lines enclose a triangle ABC and sum of the square of the tangent to the angles can be expressed in the form p/q, where p and Q are relatively prime numbers, then the value of p+q is
Arranging the lines in descending order of slope, we have
or