{"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\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":"HTML","content":"\u003cp\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003ezscoder\u003c/span\u003e has a deck of $$$n+m$$$ custom-made cards, which consists of $$$n$$$ cards labelled from $$$1$$$ to $$$n$$$ and $$$m$$$ jokers. Since \u003cspan class\u003d\"tex-font-style-tt\"\u003ezscoder\u003c/span\u003e is lonely, he wants to play a game with himself using those cards. \u003c/p\u003e\u003cp\u003eInitially, the deck is shuffled uniformly randomly and placed on the table. \u003cspan class\u003d\"tex-font-style-tt\"\u003ezscoder\u003c/span\u003e has a set $$$S$$$ which is initially empty. \u003c/p\u003e\u003cp\u003eEvery second, \u003cspan class\u003d\"tex-font-style-tt\"\u003ezscoder\u003c/span\u003e draws the top card from the deck. \u003c/p\u003e\u003cul\u003e \u003cli\u003e If the card has a number $$$x$$$ written on it, \u003cspan class\u003d\"tex-font-style-tt\"\u003ezscoder\u003c/span\u003e removes the card and adds $$$x$$$ to the set $$$S$$$. \u003c/li\u003e\u003cli\u003e If the card drawn is a joker, \u003cspan class\u003d\"tex-font-style-tt\"\u003ezscoder\u003c/span\u003e places all the cards back into the deck and reshuffles (uniformly randomly) the $$$n+m$$$ cards to form a new deck (hence the new deck now contains all cards from $$$1$$$ to $$$n$$$ and the $$$m$$$ jokers). Then, if $$$S$$$ currently contains all the elements from $$$1$$$ to $$$n$$$, the game ends. Shuffling the deck doesn\u0027t take time at all. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eWhat is the expected number of seconds before the game ends? We can show that the answer can be written in the form $$$\\frac{P}{Q}$$$ where $$$P, Q$$$ are relatively prime integers and $$$Q \\neq 0 \\bmod 998244353$$$. Output the value of $$$(P \\cdot Q^{-1})$$$ modulo $$$998244353$$$.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe only line of the input contains two integers $$$n$$$ and $$$m$$$ ($$$1 \\le n, m \\le 2 \\cdot 10^{6}$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOutput a single integer, the value of $$$(P \\cdot Q^{-1})$$$ modulo $$$998244353$$$.\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\u003e2 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e332748127\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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\u003e14 9\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e969862773\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eFor the first sample, it can be proven that the expected time before the game ends is $$$5$$$ seconds.\u003c/p\u003e\u003cp\u003eFor the second sample, it can be proven that the expected time before the game ends is $$$\\frac{28}{3}$$$ seconds.\u003c/p\u003e"}}]}