triangle ecdx midpoint ce y midpoint cd angle c right angle

In triangle ECD,X is the midpoint of CE, Y is the midpoint of CD. ANgle C is a right angle. CX is 4n-5, XE is 2n-1, CX is 3m+1, XD is 5m-1.THe hypotenuse is 10. What are the values of n and m?