Let , , and be distinct integers (mod ), and let be the point of intersection of the side or diagonal of the -gon with the transversal . Then a necessary and sufficient condition for
where and
is the ratio of the lengths and with a plus or minus sign depending on whether these segments have the same or opposite direction, is that
1. is even with and ,
2. is arbitrary and either and , or
3. and .