{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\r\n\u003cp\u003eWe have caught \u003cvar\u003e\\(N\\)\u003c/var\u003e sardines. The \u003cem\u003edeliciousness\u003c/em\u003e and \u003cem\u003efragrantness\u003c/em\u003e of the \u003cvar\u003e\\(i\\)\u003c/var\u003e-th sardine is \u003cvar\u003e\\(A_i\\)\u003c/var\u003e and \u003cvar\u003e\\(B_i\\)\u003c/var\u003e, respectively.\u003c/p\u003e\r\n\u003cp\u003eWe will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time.\u003c/p\u003e\r\n\u003cp\u003eThe \u003cvar\u003e\\(i\\)\u003c/var\u003e-th and \u003cvar\u003e\\(j\\)\u003c/var\u003e-th sardines \u003cvar\u003e\\((i \\neq j)\\)\u003c/var\u003e are on bad terms if and only if \u003cvar\u003e\\(A_i \\cdot A_j + B_i \\cdot B_j \u003d 0\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003cp\u003eIn how many ways can we choose the set of sardines to put into the cooler? Since the count can be enormous, print it modulo \u003cvar\u003e\\(1000000007\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\r\n\u003cul\u003e\r\n\u003cli\u003eAll values in input are integers.\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1 \\leq N \\leq 2 \\times 10^5\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(-10^{18} \\leq A_i, B_i \\leq 10^{18}\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\r\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(N\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(A_1\\)\u003c/var\u003e \u003cvar\u003e\\(B_1\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(:\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(A_N\\)\u003c/var\u003e \u003cvar\u003e\\(B_N\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\r\n\u003cp\u003ePrint the count modulo \u003cvar\u003e\\(1000000007\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 1","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\u003e3\r\n1 2\r\n-1 1\r\n2 -1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eThere are five ways to choose the set of sardines, as follows:\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003eThe \u003cvar\u003e\\(1\\)\u003c/var\u003e-st\u003c/li\u003e\r\n\u003cli\u003eThe \u003cvar\u003e\\(1\\)\u003c/var\u003e-st and \u003cvar\u003e\\(2\\)\u003c/var\u003e-nd\u003c/li\u003e\r\n\u003cli\u003eThe \u003cvar\u003e\\(2\\)\u003c/var\u003e-nd\u003c/li\u003e\r\n\u003cli\u003eThe \u003cvar\u003e\\(2\\)\u003c/var\u003e-nd and \u003cvar\u003e\\(3\\)\u003c/var\u003e-rd\u003c/li\u003e\r\n\u003cli\u003eThe \u003cvar\u003e\\(3\\)\u003c/var\u003e-rd\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","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\u003e10\r\n3 2\r\n3 2\r\n-1 1\r\n2 -1\r\n-3 -9\r\n-8 12\r\n7 7\r\n8 1\r\n8 2\r\n8 4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e479\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\u003c/section\u003e\r\n"}}]}