Suppose we have a 5 tuple of positive real numbers $(l_1,l_2,m_1,m_2,m_3)$, with $m_i \in (0,\pi)$ for all $i$. Now fix a point $v_1$ in the hyperbolic plane. Then consider a geodesic of length $l_1$ starting at $v_1$. suppose that ends at $v_2$. At $v_2$ draw another geodesic of length $l_2$ which makes an angle $m_1$ at $v_2$ with first line. Suppose the second geodesic ends at the point $v_3$. Then draw another geodesic of length $l_1$ at $v_3$ making an angle $m_2$ with the second geodesic. Suppose end point of the third geodesic is $v_4$. Now draw another geodesic of length $l_2$ making an angle $m_3$ at $v_4$ with the third geodesic. Let the end point of the last geodesic is $v_5$.
Then can we put some condition on the tuple to get $v_5=v_1$? If yes what that condition should be?
Thanks in advance.