{"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\"\u003eThere are some chickens and rabbits in the cage. They have fifteen heads and forty feet in all.\u003cbr\u003eHow many chickens and rabbits are there respectively?\u003cbr\u003eIt is a classical math problem which can date back to the Northern and Southern Dynasties (420-589). Here is an interesting algorithm to solve the problem: Assume that the chickens and rabbits are well trained. You whistle, and all of them lift a leg, then there are 40-15 \u003d 25 feet on the floor. You whistle again, and there are 25 - 15 \u003d 10 legs remain standing. After two whistles, all the chickens sit on the floor, and all the rabbits stand on two legs. So there are 10/2 \u003d 5 rabbits and 15 - 5 \u003d 10 chickens.\u003cbr\u003eJohn has a farm with lots of animals in it. He is now facing the similar problem. There are exactly N kinds of animals and he wants to know their quantities. He only knows that different kinds of animals have different number of legs (at least one), but he has no idea how many legs they each have. He trains the animals and tries to figure it out using the algorithm stated above. First he makes all the animals stand up with all their legs and counts their legs. then, for each time he whistles, all the animals lift one leg(if it has at least one leg standing on the ground), and then he counts the feet again. After K times, he thinks that it is enough to determine the quantity of each kind of animal, but does it really work? So, it is your job to help him to solve the problem.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains an integer T(1 \u0026lt;\u003d T \u0026lt;\u003d 100), indicating the number of test cases.\u003cbr\u003eEach test case contains two lines.\u003cbr\u003eThe first line contains two integers N(1 \u0026lt;\u003d N \u0026lt;\u003d 1000) and K(1 \u0026lt;\u003d K \u0026lt;\u003d 1000), representing the number of different kinds of animals and the time he whistles.\u003cbr\u003eThe second line contains K + 1 integers A\u003csub\u003e0\u003c/sub\u003e,A\u003csub\u003e1\u003c/sub\u003e ... A\u003csub\u003eK\u003c/sub\u003e(0 \u0026lt;\u003d A\u003csub\u003ei\u003c/sub\u003e \u0026lt;\u003d 10\u003csup\u003e4\u003c/sup\u003e) where A\u003csub\u003ei\u003c/sub\u003e represents the number of legs after his i\u003csup\u003eth\u003c/sup\u003e whistle."}},{"title":"Output","value":{"format":"HTML","content":"For each test case in the input, print several lines.\u003cbr\u003eThe first line contains \"Case #X:\", where X is the test case number (starting with 1).\u003cbr\u003eThe next line contains \"No Solution\", \"Unique Solution\" or \"Multiple Solutions\" according to the result.\u003cbr\u003eIf the result is uniquely determined, you should print N extra lines each contains two integer L\u003csub\u003ei\u003c/sub\u003e,N\u003csub\u003ei\u003c/sub\u003e, where L\u003csub\u003ei\u003c/sub\u003e represents how many legs does the ith kind of animal have and N\u003csub\u003ei\u003c/sub\u003e represents the number of ith kind of animal. The animals should be sorted by the number of their legs in ascending order."}},{"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\u003e3\r\n2 3\r\n14 9 6 3\r\n2 2\r\n8 5 3\r\n3 2\r\n20 13 8\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1:\r\nUnique Solution\r\n1 2\r\n4 3\r\nCase #2:\r\nNo Solution\r\nCase #3:\r\nMultiple Solutions\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}