{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eLittle G loves cookies.\u003c/p\u003e\u003cp\u003eOne day, he bought a bag of cookies and started eating. The shape of each cookie can be approximately regarded as a convex polygon in 2D coordinate system. Unconsciously, a few cookies fell to the ground and each of them broke into two pieces. The broken pieces can be regarded as simple polygons.\u003c/p\u003e\u003cp\u003eLittle G didn\u0027t want them to go to waste. So, he randomly picked two pieces from the ground and try to restore the original cookie by translating one of the pieces.\u003c/p\u003e\u003cp\u003eLittle G is poor at geometry, it takes long time for him to do this or figure out it\u0027s just impossible to form a convex polygon using the two simple polygons. Please write a program to help him.\u003c/p\u003e\u003cp\u003eNote that after combining, the overlapping edges of two polygons need to correspond one to one. One edge matching two or more edges of another polygon is illegal.\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" height\u003d\"163px\" src\u003d\"CDN_BASE_URL/26f8b6d8027e3eff42b0aeec91df5201?v\u003d1726229891\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\" width\u003d\"491px\"\u003e \u003c/center\u003e\u003cp\u003eThe graph above shows one illegal situation for matching (a). The situation (b) of the graph is illegal because the right edge of the first square matches two edges of the other polygon. The situation (c) is legal.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains an integer $$$n ~ (3 \\leq n \\leq 2000)$$$, indicating the number of the vertexes of the first simple polygon.\u003c/p\u003e\u003cp\u003eThen the following $$$n$$$ lines describes the coordinates of the $$$n$$$ vertexes in counter-clockwise order. Each line contains only two integers $$$x_i, y_i ~ (0 \\leq x_i,y_i \\leq 10^9)$$$.\u003c/p\u003e\u003cp\u003eThe next line contains an integer $$$m ~ (3 \\leq m \\leq 2000)$$$, indicating the number of the vertexes of the second simple polygon.\u003c/p\u003e\u003cp\u003eThen the following $$$m$$$ lines describes the coordinates of the $$$m$$$ vertexes in counter-clockwise order. Each line contains only two integers $$$x_i, y_i ~ (0 \\leq x_i,y_i \\leq 10^9)$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOne line with a single string \u003cspan class\u003d\"tex-font-style-tt\"\u003eyes\u003c/span\u003e or \u003cspan class\u003d\"tex-font-style-tt\"\u003eno\u003c/span\u003e. Print \u003cspan class\u003d\"tex-font-style-tt\"\u003eyes\u003c/span\u003e if these two polygons can form a convex polygon by translating one of them, otherwise print \u003cspan class\u003d\"tex-font-style-tt\"\u003eno\u003c/span\u003e.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e8\n20 0\n18 15\n12 17\n6 9\n10 6\n12 8\n12 16\n17 8\n9\n11 18\n2 15\n9 1\n19 1\n16 9\n11 17\n11 9\n9 7\n5 10\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eyes\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eThe graph below describes the sample where $$$P_1, P_2, \\cdots, P_8$$$ is the $$$8$$$ points for the first polygon and $$$Q_1, Q_2, \\cdots, Q_9$$$ is the $$$9$$$ points for the second polygon respectively.\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" height\u003d\"229px\" src\u003d\"CDN_BASE_URL/627328137c39abca5c3d9abe71a0134f?v\u003d1726229891\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\" width\u003d\"643px\"\u003e \u003c/center\u003e"}}]}