{"trustable":true,"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":"\u003cdiv class\u003d\"panel_content\"\u003eIt was in a dark daybreak. Dr. Gneh, who was a crazy scientist once trying to dominate the whole humankind by deploying a powerful AI network, had been discovered in a mansion on the grand field outside city of ACM. This time, he got no place to hide. \u003cbr\u003eTo help specify the capture operation, let\u0027s assume the grand field had nothing else but the mansion on coordinate (X\u003csub\u003em\u003c/sub\u003e, Y\u003csub\u003em\u003c/sub\u003e). N interpol elites had been assigned to N different positions around the mansion. The i-th interpol on initial position (X\u003csub\u003ei\u003c/sub\u003e, Y\u003csub\u003ei\u003c/sub\u003e) could move at a maximum speed rate V\u003csub\u003ei\u003c/sub\u003e m/s. It was said that Dr. Gneh had invent a rocket motorbike to escape this operation. According to our information, his ride could not change any direction, and ran at a maximum speed rate V\u003csub\u003em\u003c/sub\u003e m/s. For the human future, any failure in this operation was not acceptable. We had to make sure that Dr. Gneh would be captured no matter which way (a particular speed and direction) to flee. It was assumed that our interpols would take action from their positions immediately after Dr. Gneh left his hideout, and be informed of his flee direction at the same time. \u003cbr\u003eApparently, this was an interesting algorithm problem. Could you tell us whether this operation would be success by our given layout? If yes, what was the minimum number of interpols needed to achieve this success?\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are multiple test cases.\u003cbr\u003eThe first line contains a number T (1 ≤ T ≤ 100) indicating the number of test cases.\u003cbr\u003eIn each test case, there is an integer N (1 ≤ N ≤ 1000) indicating the number of interpols on the first line. \u003cbr\u003eIn the following N+1 lines, describe the specification of Dr. Gneh and our N interpols, and the first line for Dr. Gneh and the next N lines for interpols. \u003cbr\u003eOn each line, three float numbers (range [-1e5, 1e5]) represent the speed rate in m/s(which is none negative), x and y coordinate in meters.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, you only need to output one single number, the minimum number of interpols to capture Dr. Gneh. If it wouldn\u0027t be success with all our interpols, output number 0 instead.\u003cbr\u003e"}},{"title":"Sample","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\u003e2\r\n4\r\n1.0 0 0\r\n1.0 1 0\r\n1.0 0 1\r\n1.0 -1 0\r\n1.0 0 -1\r\n4\r\n2.0 0 0\r\n1.0 1 0\r\n1.0 0 1\r\n1.0 -1 0\r\n1.0 0 -1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\r\n0\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"If the distance between interpol and Dr. Gneh can be infinitely small, Dr. Gneh is considered to be captured."}}]}