{"raw_statement":[{"iden":"statement","content":"Alice and Bob play different games. When Alice plays, she always wins exactly a points. When Bob plays, he always wins exactly b points. \n\nToday, after they finished playing, they noticed they had the same number of points. What is the smallest number this could be?\n\nThe first line contains two integers, a and b, separated by spaces, where a is the number of points Alice wins in one game and b is the number of points Bob wins in one game. \n\nYou should return the smallest possible number of points that Alice and Bob have, which should be an integer c. \n\n#cf_span(class=[tex-font-style-underline], body=[Constraints]):\n\n1 ≤ a ≤ 10, 000\n\n1 ≤ b ≤ 10, 000\n\n1 ≤ c ≤ 100, 000, 000\n\n"},{"iden":"input","content":"The first line contains two integers, a and b, separated by spaces, where a is the number of points Alice wins in one game and b is the number of points Bob wins in one game. "},{"iden":"output","content":"You should return the smallest possible number of points that Alice and Bob have, which should be an integer c. "},{"iden":"examples","content":"Input2 3Output6Input4 6Output12"},{"iden":"note","content":"#cf_span(class=[tex-font-style-underline], body=[Constraints]):1 ≤ a ≤ 10, 0001 ≤ b ≤ 10, 0001 ≤ c ≤ 100, 000, 000"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ M \\in \\mathbb{Z}^+ $ be the number of piles, $ K \\in \\mathbb{Z}^+ $ the number of distinct pile sizes.  \nLet $ C = \\{c_1, c_2, \\dots, c_K\\} \\subset \\mathbb{Z}^+ $ be the set of possible pile sizes.  \n\n**Constraints**  \n1. $ 1 \\le M \\le 10^9 $  \n2. $ 1 \\le K < 2^{17} $  \n3. $ 1 \\le c_i < 2^{17} $ for all $ i \\in \\{1, \\dots, K\\} $  \n4. Each pile size is chosen independently and uniformly from $ C $.  \n\n**Objective**  \nCompute the probability that the Nim position with $ M $ piles, each independently sampled uniformly from $ C $, is a winning position for the first player (Alice).  \n\nIn Nim, a position is winning iff the XOR-sum (nim-sum) of all pile sizes is nonzero.  \n\nLet $ \\mathcal{P} $ be the probability that the nim-sum of $ M $ independent uniform samples from $ C $ is nonzero.  \n\nOutput $ \\mathcal{P} \\mod 998244353 $, represented as $ P \\cdot Q^{-1} \\mod 998244353 $, where $ \\mathcal{P} = \\frac{P}{Q} $ in lowest terms.","simple_statement":"Alice and Bob will buy M piles of stones, each pile has size chosen randomly from K given sizes, each with equal probability. Alice moves first in Nim. Find the probability that Alice has a winning strategy, modulo 998244353.","has_page_source":false}