{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n Jack knows that there is a great underground treasury in a secret region. And he has a special device that can be used to detect treasury under the surface of the earth. One day he got outside with the device to ascertain the treasury. He chose many different locations on the surface of the earth near the secret region. And at each spot he used the device to detect treasury and got some data from it representing a region, which may contain treasury below the surface. The data from the device at each spot is six integers x \n \u003csub\u003e1\u003c/sub\u003e, y \n \u003csub\u003e1\u003c/sub\u003e, z \n \u003csub\u003e1\u003c/sub\u003e, x \n \u003csub\u003e2\u003c/sub\u003e, y \n \u003csub\u003e2\u003c/sub\u003e and z \n \u003csub\u003e2\u003c/sub\u003e (x \n \u003csub\u003e1\u003c/sub\u003e\u0026lt;x \n \u003csub\u003e2\u003c/sub\u003e, y \n \u003csub\u003e1\u003c/sub\u003e\u0026lt;y \n \u003csub\u003e2\u003c/sub\u003e, z \n \u003csub\u003e1\u003c/sub\u003e\u0026lt;z \n \u003csub\u003e2\u003c/sub\u003e). According to the instruction of the device they represent the range of x, y and z coordinates of the region. That is to say, the x coordinate of the region, which may contain treasury, ranges from x \n \u003csub\u003e1\u003c/sub\u003e to x \n \u003csub\u003e2\u003c/sub\u003e. So do y and z coordinates. The origin of the coordinates is a fixed point under the ground. \n \u003cbr\u003eJack can’t get the total volume of the treasury because these regions don’t always contain treasury. Through years of experience, he discovers that if a region is detected that may have treasury at more than two different spots, the region really exist treasure. And now Jack only wants to know the minimum volume of the treasury. \n \u003cbr\u003e Now Jack entrusts the problem to you. \n \u003cbr\u003e \n \u003cbr\u003e \n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input file contains a single integer t, the number of test cases, followed by the input data for each test case. \n\u003cbr\u003e Each test case is given in some lines. In the first line there is an integer n (1 ≤ n ≤ 1000), the number of spots on the surface of the earth that he had detected. Then n lines follow, every line contains six integers x \n\u003csub\u003e1\u003c/sub\u003e, y \n\u003csub\u003e1\u003c/sub\u003e, z \n\u003csub\u003e1\u003c/sub\u003e, x \n\u003csub\u003e2\u003c/sub\u003e, y \n\u003csub\u003e2\u003c/sub\u003e and z \n\u003csub\u003e2\u003c/sub\u003e, separated by a space. The absolute value of x and y coordinates of the vertices is no more than 10 \n\u003csup\u003e6\u003c/sup\u003e, and that of z coordinate is no more than 500. \n\u003cbr\u003e \n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, you should output “Case a: b” in a single line. a is the case number, and b is the minimum volume of treasury. The case number is counted from one. \n\u003cbr\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2\n1\n0 0 0 5 6 4\n3\n0 0 0 5 5 5\n3 3 3 9 10 11\n3 3 3 13 20 45\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003eCase 1: 0\nCase 2: 8\u003c/pre\u003e"}}]}