In a right triangle, the hypotenuse is 5 units long, and the legs also have integer lengths. How long are the legs?
Note:How many different cases are there?