{"trustable":false,"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":"MD","content":"当前位置是 $p \u003d (x, y)$,沿着向量为 $\\vec{v}\u003d(x\u0027, y\u0027)$ 的方向走,到达位置为 $p+\\vec{v} \u003d (x+x\u0027, y+y\u0027)$,距离原先位置 $p$ 是 $\\sqrt{x\u0027 * x\u0027 + y\u0027 * y\u0027}$。\n\n小明的家在地图远点。 \n\n小明负气,说要离家出走。\n\n他已经选择了一系列的移动向量:$\\vec{v_1}, \\vec{v_2}, ..., \\vec{v_n}$。\n\n但是他其实并不是真的想要离家太远。\n\n他想啊:虽然我决定要走这些向量,但是我没规定正反方向对吧,所以有的向量我按照 $+\\vec{v_i}$ 来行动,有的向量我按照 $-\\vec{v_i}$ 来行动,兴许就不会离家很远吧。\n\n请给 n 个向量定下正负方向,当小明按照定下的方向前进后,最终离家距离不超过 $1.5*10^{6}$。"}},{"title":"Input","value":{"format":"MD","content":"\u003cp\u003eThe first line contains a single integer $$$n$$$ ($$$1 \\le n \\le 10^5$$$)\u0026nbsp;— the number of moves.\u003c/p\u003e\n\u003cp\u003eEach of the following lines contains two space-separated integers $$$x_i$$$ and $$$y_i$$$, meaning that $$$\\vec{v_i} \u003d (x_i, y_i)$$$. We have that $$$|v_i| \\le 10^6$$$ for all $$$i$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"MD","content":"\u003cp\u003eOutput a single line containing $$$n$$$ integers $$$c_1, c_2, \\cdots, c_n$$$, each of which is either $$$1$$$ or $$$-1$$$. Your solution is correct if the value of $$$p \u003d \\sum_{i \u003d 1}^n c_i \\vec{v_i}$$$, satisfies $$$|p| \\le 1.5 \\cdot 10^6$$$.\u003c/p\u003e\n\u003cp\u003eIt can be shown that a solution always exists under the given constraints.\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"MD","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\u003e3\n999999 0\n0 999999\n999999 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 1 -1 \n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","value":{"format":"MD","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\u003e1\n-824590 246031\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 \n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 3","value":{"format":"MD","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\n-67761 603277\n640586 -396671\n46147 -122580\n569609 -2112\n400 914208\n131792 309779\n-850150 -486293\n5272 721899\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 1 1 1 1 1 1 -1 \n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}