{"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$间房子里。每个房屋都位于一个二维平面上,位于一个具有整数坐标的点上。同一地点可能有不同的房屋。TomiokapEace正在向存存询问东方展览馆的建设地点。你必须找到地点的数量(带有整数坐标的点),这样所有房屋到展览的总距离就最小了。展览可以和一些房子建在同一地点。两点$(x_1,y_1)$和$(x_2,y_2)$之间的距离是$|x_1-x_2|+| y_1-y_2 |$,其中$|x|$是$x$的绝对值。"}},{"title":"Input","value":{"format":"MD","content":"第一行包含一个整数$t$$(1 \\leq t \\leq 1000)$——测试用例的个数。\n\n每个测试用例的第一行包含一个整数$n$,接下来$n$$(1 \\leq n \\leq 1000)$行表示房子的位置$(x_i,y_i)$$(0 \\leq x_i, y_i \\leq 10^9)$。\n\n保证测试用例$n$总和不超过$1000$。"}},{"title":"Output","value":{"format":"MD","content":"\u003cp\u003eFor each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house.\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\u003e6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n4\n4\n4\n3\n1\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\u003eHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.\u003c/p\u003e\n\u003cp\u003e\u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/0546d36f1a549b746baf008bd6559642?v\u003d1648477176\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\n\u003cp\u003eFirst test case.\u003c/p\u003e\n\u003cp\u003e\u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/c634b2abd61cc1cd8e1d6241e27090c1?v\u003d1648477176\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\n\u003cp\u003eSecond test case. \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/96fa87bb3034f12b4f6f52cd6c836ecb?v\u003d1648477176\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\n\u003cp\u003eThird test case. \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/ee3cc55abcfb6b5407fceb74e0cbe1d4?v\u003d1648477176\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\n\u003cp\u003eFourth test case. \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/0870fb58702ab5b3102ec3e1ea91a69f?v\u003d1648477176\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\n\u003cp\u003eFifth test case. \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/7b2053e6c58b818ef8c14c927c554313?v\u003d1648477176\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\n\u003cp\u003eSixth test case. Here both houses are located at $$$(0, 0)$$$.\u003c/p\u003e"}}]}