Let $S=\{(m, n): m, n \in\{1,2,3, \ldots, 50\}\}$. If the number of elements ( $\mathrm{m}, \mathrm{n}$ ) in S such that $6^m+9^n$ is a multiple of 5 is p and the number of elements ( $\mathrm{m}, \mathrm{n}$ ) in S such that $\mathrm{m}+\mathrm{n}$ is a square of a prime number is q , then $\mathrm{p}+\mathrm{q}$ is equal to $\_\_\_\_$ .