1994 AIME Problem 10

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