There is a unique angle \theta between 0^{\circ} and 90^{\circ} such that for nonnegative integers n, the value of \tan \left(2^{n} \theta\right) is positive when n is a multiple of 3 , and negative otherwise. The degree measure of \theta is \frac{p}{q}, where p and q are relatively prime integers. Find p+q.