{"trustable":true,"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\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eDuha decided to have a trip to Singapore by plane.\u003c/p\u003e\u003cp\u003eThe airplane had $$$n$$$ seats numbered from $$$1$$$ to $$$n$$$, and $$$n$$$ passengers including Duha which were also counted from $$$1$$$ to $$$n$$$. The passenger with number $$$i$$$ held the ticket corresponding to the seat with number $$$i$$$, and Duha was the number $$$1$$$ passenger.\u003c/p\u003e\u003cp\u003eAll passengers got on the plane in the order of their numbers from $$$1$$$ to $$$n$$$. However, before they got on the plane Duha lost his ticket (and Duha was the only passenger who lost the ticket), so he could not take his seat correctly. He decided to take a seat randomly. And after that, while a passenger got on the plane and found that his/her seat has been occupied, he/she selected an empty seat randomly as well. A passenger except Duha selected the seat displayed in his/her ticket if it had not been occupied by someone else.\u003c/p\u003e\u003cp\u003eThe first problem you are asked to calculate in this problem is the probability of the last passenger to get on the plane that took his/her correct seat.\u003c/p\u003e\u003cp\u003eSeveral days later, Duha finished his travel in Singapore, and he had a great time.\u003c/p\u003e\u003cp\u003eOn the way back, he lost his ticket again. And at this time, the airplane had $$$m$$$ seats numbered from $$$1$$$ to $$$m$$$, and $$$m$$$ passengers including Duha which were also counted from $$$1$$$ to $$$m$$$. The passenger with number $$$i$$$ held the ticket corresponding to the seat with number $$$i$$$, and Duha was the number $$$1$$$ passenger as well.\u003c/p\u003e\u003cp\u003eThe difference was that: all passengers got on the plane in a random order (which was any one of the $$$m!$$$ different orders with the same chance). Similarly, Duha or a passenger who found his/her seat had been occupied selected an empty seat randomly.\u003c/p\u003e\u003cp\u003eThe second problem you are asked to calculate in this problem is the probability of the last passenger to get on the plane that took his/her right seat on the return trip.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input contains several test cases, and the first line is a positive integer $$$T$$$ indicating the number of test cases which is up to $$$50$$$.\u003c/p\u003e\u003cp\u003eFor each test case, a line contains two integers $$$n$$$ and $$$m~(1\\le n, m\\le 50)$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output a line containing \u003cspan class\u003d\"tex-font-style-tt\"\u003eCase #x: y z\u003c/span\u003e, where \u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e is the test case number starting from $$$1$$$, \u003cspan class\u003d\"tex-font-style-tt\"\u003ey\u003c/span\u003e is the answer of the first problem, and \u003cspan class\u003d\"tex-font-style-tt\"\u003ez\u003c/span\u003e is the answer of the second problem. Both of \u003cspan class\u003d\"tex-font-style-tt\"\u003ey\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003ez\u003c/span\u003e are rounded to $$$6$$$ places, and we guarantee that their $$$7$$$-th places after the decimal point in the precise answer would not be $$$4$$$ or $$$5$$$.\u003c/p\u003e"}},{"title":"Examples","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\u003e1\n2 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: 0.500000 0.666667\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}