{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n div.illustration {\n float: right;\n padding-left: 20px;\n }\n div.illustration .illustration {\n width: 100%;\n border-radius: 4px;\n }\n pre {\n display: block;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n }\n div.sampleinteractionread {\n width: 60%;\n margin: 3px 0px 3px 0px;\n }\n div.sampleinteractionread pre {\n margin: 1px 5px 1px 5px;\n border-radius: 5px;\n border: solid 1px rgba(255, 255, 255, 0.25);\n background-color: #cccccc;\n padding: 14px 13px;\n font-family: Courier, monospace;\n font-variant-ligatures: none;\n }\n div.sampleinteractionwrite {\n width: 60%;\n margin: 3px 0px 3px 0px;\n margin-left: auto;\n }\n div.sampleinteractionwrite pre {\n margin: 1px 5px 1px 5px;\n border-radius: 5px;\n border: solid 1px rgba(255, 255, 255, 0.25);\n background-color: #cccccc;\n padding: 14px 13px;\n font-family: Courier, monospace;\n font-variant-ligatures: none;\n }\n table.sample {\n width: 100%;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\n \u003ch2\u003eInput\u003c/h2\u003e\n\n \u003cp\u003eInput contains several test cases. Each test case begins\n with an integer \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e\n (\u003cspan class\u003d\"tex2jax_process\"\u003e$3 \\leq n \\leq 1000$\u003c/span\u003e).\n Then follow the \u003cspan class\u003d\"tex2jax_process\"\u003e$n$\u003c/span\u003e\n vertices of a simple polygon, one per line, each of the form\n \u003cspan class\u003d\"tex2jax_process\"\u003e$x\\ y$\u003c/span\u003e. The points may be\n given in either clockwise or counterclockwise order. Then comes\n an integer \u003cspan class\u003d\"tex2jax_process\"\u003e$m$\u003c/span\u003e\n (\u003cspan class\u003d\"tex2jax_process\"\u003e$m \\leq 100$\u003c/span\u003e), giving the\n number of points to test, followed by \u003cspan class\u003d\"tex2jax_process\"\u003e$m$\u003c/span\u003e lines, each containing a point in\n the same format as above. Coordinates are integers with\n absolute value bounded by 10000. The input is terminated by a\n case beginning with 0.\u003c/p\u003e\n\n \u003ch2\u003eOutput\u003c/h2\u003e\n\n \u003cp\u003eFor each test case, output \u003cspan class\u003d\"tex2jax_process\"\u003e$m$\u003c/span\u003e lines, one for each point to test.\n The \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003e:th output for a\n test case should be one of “\u003ctt\u003ein\u003c/tt\u003e”, “\u003ctt\u003eout\u003c/tt\u003e”,\n “\u003ctt\u003eon\u003c/tt\u003e”, depending on whether the \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003e:th test point lies inside,\n outside, or on the given polygon.\u003c/p\u003e\n\n \u003ch2\u003eSample 1\u003c/h2\u003e\u003cbody\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e3\n0 0\n10 0\n0 10\n3\n4 5\n5 5\n6 5\n5\n41 -6\n-24 -74\n-51 -6\n73 17\n-30 -34\n2\n-12 -26\n39 -8\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003ein\non\nout\nout\nin\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n "}}]}