Let the product of $\omega_1=(8+i) \sin \theta+(7+4 i) \cos \theta$ and $\omega_2=(1+8 i) \sin \theta+(4+7 i) \cos \theta$ be $\alpha+i \beta, i=\sqrt{-1}$. Let p and q be the maximum and the minimum values of $\alpha+\beta$ respectively. Then $p+q$ is equal to :