{"raw_statement":[{"iden":"problem statement","content":"On a two-dimensional plane, there is a convex polygon $C$ with $N$ vertices, and points $S=(s_x, s_y)$ and $T=(t_x,t_y)$. The vertices of $C$ are $(x_1,y_1),(x_2,y_2),\\ldots$, and $(x_N,y_N)$ in counterclockwise order. It is guaranteed that $S$ and $T$ are outside the polygon.\nFind the shortest distance that needs to be traveled to get from point $S$ to point $T$ without entering the interior of $C$ except for its circumference."},{"iden":"constraints","content":"*   $3\\leq N \\leq 10^5$\n*   $|x_i|,|y_i|,|s_x|,|s_y|,|t_x|,|t_y|\\leq 10^9$\n*   $(x_1,y_1),(x_2,y_2),\\ldots$, and $(x_N,y_N)$ form a convex polygon in counterclockwise order.\n*   No three points of $C$ are colinear.\n*   $S$ and $T$ are outside $C$ and not on the circumference of $C$.\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ \n$x_1$ $y_1$\n$x_2$ $y_2$\n$\\vdots$\n$x_N$ $y_N$\n$s_x$ $s_y$\n$t_x$ $t_y$"},{"iden":"sample input 1","content":"4\n1 1\n3 1\n3 3\n1 3\n0 2\n5 2"},{"iden":"sample output 1","content":"5.65028153987288474496\n\nOne way to achieve the shortest distance is shown in the following figure.\n![image](https://img.atcoder.jp/abc286/4affd3de612079930dd393002bbae832.png)\nIf you travel as $(0,2) \\to (1,3) \\to(3,3)\\to(5,2)$, the length of the path from point $S$ to point $T$ is $5.650281...$. We can prove that it is the minimum. Note that you may enter the circumference of $C$.\nNote that your output is considered correct if the absolute or relative error is at most $10^{-6}$. For example, output like `5.650287` is also considered correct."},{"iden":"sample input 2","content":"3\n0 0\n2 0\n1 10\n3 7\n10 3"},{"iden":"sample output 2","content":"8.06225774829854965279"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}