One leg of a right triangle has length 7 and all sides are whole numbers. Find the lengths of the other two sides.