{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\nThere is a beautiful garden in Marjar University. Recently, Edward, the headmaster of Marjar University, decided to build a garden water sprinkler system. The system consists of three sprinklers.\n\u003c/p\u003e\n\n\u003cp\u003e\nAssuming that Marjar University is an infinite plane, the garden is a circle whose center is at (\u003cvar\u003eX\u003csub\u003e0\u003c/sub\u003e\u003c/var\u003e, \u003cvar\u003eY\u003csub\u003e0\u003c/sub\u003e\u003c/var\u003e) with radius \u003cvar\u003eR\u003c/var\u003e. Now, Edward has already determined the position for two sprinklers at (\u003cvar\u003eX\u003csub\u003e1\u003c/sub\u003e\u003c/var\u003e, \u003cvar\u003eY\u003csub\u003e1\u003c/sub\u003e\u003c/var\u003e) and (\u003cvar\u003eX\u003csub\u003e2\u003c/sub\u003e\u003c/var\u003e, \u003cvar\u003eY\u003csub\u003e2\u003c/sub\u003e\u003c/var\u003e). He needs to choose the position for the last sprinkler. Here are some conditions to be satisfied:\n\u003c/p\u003e\n\n\u003col\u003e\n \u003cli\u003eThe three sprinklers should not in the same line.\u003c/li\u003e\n \u003cli\u003eThe last sprinkler should be located inside or on the boundary of the garden.\u003c/li\u003e\n \u003cli\u003eThe coordinates of the sprinklers must be integers.\u003c/li\u003e\n \u003cli\u003eTwice the area of the triangle that the three sprinklers form should equals \u003cvar\u003eS\u003c/var\u003e.\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cp\u003e\nUnder these conditions, Edward wants to know the number of possible positions for the last sprinkler. Please write a program to help him!\n\u003c/p\u003e\n\n\u003ch4\u003eInput\u003c/h4\u003e\n\n\u003cp\u003eThere are multiple test cases. The first line of input contains an integer \u003cvar\u003eT\u003c/var\u003e indicating the number of test cases. For each test case:\u003c/p\u003e\n\n\u003cp\u003e\nThe first line contains an integer \u003cvar\u003eS\u003c/var\u003e (1 \u0026lt;\u003d \u003cvar\u003eS\u003c/var\u003e \u0026lt;\u003d 10\u003csup\u003e8\u003c/sup\u003e). The next line contains three integers \u003cvar\u003eX\u003csub\u003e0\u003c/sub\u003e\u003c/var\u003e, \u003cvar\u003eY\u003csub\u003e0\u003c/sub\u003e\u003c/var\u003e and \u003cvar\u003eR\u003c/var\u003e (1 \u0026lt;\u003d \u003cvar\u003eR\u003c/var\u003e \u0026lt;\u003d 10\u003csup\u003e8\u003c/sup\u003e). The last line contains four integers \u003cvar\u003eX\u003csub\u003e1\u003c/sub\u003e\u003c/var\u003e, \u003cvar\u003eY\u003csub\u003e1\u003c/sub\u003e\u003c/var\u003e, \u003cvar\u003eX\u003csub\u003e2\u003c/sub\u003e\u003c/var\u003e and \u003cvar\u003eY\u003csub\u003e2\u003c/sub\u003e\u003c/var\u003e.\n\u003c/p\u003e\n\n\u003cp\u003e\nIt is guaranteed that the absolute value of all input coordinates will not exceed 10\u003csup\u003e8\u003c/sup\u003e and the positions of the two existing sprinklers are different.\n\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\n\u003cp\u003eFor each test case, output the number of possible positions.\u003c/p\u003e\n\n\u003ch4\u003eSample\u003c/h4\u003e\n\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\u003e1\n4\n0 0 4\n-1 0 1 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e14\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n\u003ch4\u003eHint\u003c/h4\u003e\n\n\u003cp\u003e\nIn the sample test case, the possible positions for the last sprinkler are: (-3, 2), (-2, 2), (-1, 2), (0, 2), (1, 2), (2, 2), (3, 2), (-3, -2), (-2, -2), (-1, -2), (0, -2), (1, -2), (2, -2), (3, -2).\n\u003c/p\u003e\n"}}]}