The altitude to the hypotenuse of a right triangle divides the hypotenuse into segments whose lengths are in the ratio of 1:4. The length of the altitude is 12. How long is the hypotenuse?