In triangle $ABC,$ angle $C$ is a right angle and the altitude from $C$ meets $\overline{AB}$ at $D.$ The lengths of the sides of $\triangle ABC$ are integers, $BD=29^3,$ and $\cos B=m/n$ , where $m$ and $n$ are relatively prime positive integers. Find $m+n.$

Let's think step by step and output the final answer within \boxed{}.
user