The altitude drawn to the hypotenuse of a right triangle divides the hypotenuse into segments such that their lengths are in the ratio of 1:4. If the length of the altitude is 8, find the length of: (a) each segment of the hypotenuse and (b) the longer leg of the triangle.