{"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":"保卫大本营\n\n在一个二维平面上,有 $N$ 座炮台和 $M$ 个大本营,所有炮台和大本营的坐标已经给出。\n\n大本营需要炮台的保护,但由于供能问题,一个大本营**只能选择两个炮塔**,并且三者的坐标组成一个**直角三角形**,才能到达最基本的防卫要求。\n\n现在询问对于每个大本营,到达基本防卫要求的方案有多少种。\n\n(ps:**不同方案要求组成的直角三角形不同**,同时每次询问之间**相互独立**)"}},{"title":"Input","value":{"format":"MD","content":"第一行输入两个整数 $N$ 和 $M$($2\\le N\\le 2000,1\\le M\\le 2000$),表示炮台的数量和大本营的数量。\n\n接下来的 $N$ 行分别包含两个整数 $x_i,y_i$($-10^9\\le x_i,y_i\\le 10^9$),表示炮台的坐标。\n\n接下来的 $M$ 行分别包含两个整数 $x_i,y_i$($-10^9\\le x_i,y_i\\le 10^9$),表示大本营的坐标。\n\n保证给出的每个坐标都是**不同的**,没有重复"}},{"title":"Output","value":{"format":"MD","content":"输出 $M$ 行,每行一个整数表示每个大本营到达基本防卫要求的方案数。"}},{"title":"Examples","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\u003e4 2\n0 1\n1 0\n0 -1\n-1 0\n0 0\n1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\n3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"\u003cp\u003e对于第一座大本营,有以下四种选取方案\u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$\\{(0,0),(0,1),(1,0)\\}$$$ \u003c/li\u003e\u003cli\u003e $$$\\{(0,0),(0,1),(-1,0)\\}$$$ \u003c/li\u003e\u003cli\u003e $$$\\{(0,0),(0,-1),(1,0)\\}$$$ \u003c/li\u003e\u003cli\u003e $$$\\{(0,0),(0,-1),(-1,0)\\}$$$ \u003c/li\u003e\u003c/ul\u003e\u003cp\u003e对于第二座大本营,有以下三种选取方案 \u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$\\{(1,1),(0,1),(1,0)\\}$$$ \u003c/li\u003e\u003cli\u003e $$$\\{(1,1),(0,1),(0,-1)\\}$$$ \u003c/li\u003e\u003cli\u003e $$$\\{(1,1),(1,0),(-1,0)\\}$$$ \u003c/li\u003e\u003c/ul\u003e"}}]}