On the Cartesian plane, the midpoint between two points $A(a,b)$ and $B(c,d)$ is $M(m,n)$. If $A$ is moved vertically upwards 8 units and horizontally to the right 2 units, and $B$ is moved vertically downwards 2 units and horizontally to the left 10 units, then the new midpoint between $A$ and $B$ is $M'$. What is the distance between $M$ and $M'$?