Cars $X$ and $Y$ begin the race simultaneously with velocities $8\text{ ms}^{-1}$ and $4\text{ ms}^{-1}$, moving in a straight line with uniform accelerations $2\text{ ms}^{-2}$ and $4\text{ ms}^{-2}$ respectively. If they reach final point at the same instant, then the length of the path is