Let $n \ge 2$ be an integer. Alex writes the numbers $1, 2, ..., n$ in some order on a circle such that any two neighbours are coprime. Then, for any two numbers that are not comprime, Alex draws a line segment between them. For each such segment $s$ we denote by $d_s$ the difference of the numbers written in its extremities and by $p_s$ the number of all other drawn segments which intersect $s$ in its interior. Find the greatest $n$ for which Alex can write the numbers on the circle such that $p_s \le |d_s|$, for each drawn segment $s$.