{"problem":{"name":"A. Die Roll","description":{"content":"Yakko, Wakko and Dot, world-famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit. Yakko dreamt to go to Pennsylvania, his Motherland and the Motherland of his a","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":65536},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF9A"},"statements":[{"statement_type":"Markdown","content":"Yakko, Wakko and Dot, world-famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit. Yakko dreamt to go to Pennsylvania, his Motherland and the Motherland of his ancestors. Wakko thought about Tasmania, its beaches, sun and sea. Dot chose Transylvania as the most mysterious and unpredictable place.\n\nBut to their great regret, the leave turned to be very short, so it will be enough to visit one of the three above named places. That's why Yakko, as the cleverest, came up with a truly genius idea: let each of the three roll an ordinary six-sided die, and the one with the highest amount of points will be the winner, and will take the other two to the place of his/her dreams.\n\nYakko thrown a die and got _Y_ points, Wakko — _W_ points. It was Dot's turn. But she didn't hurry. Dot wanted to know for sure what were her chances to visit Transylvania.\n\nIt is known that Yakko and Wakko are true gentlemen, that's why if they have the same amount of points with Dot, they will let Dot win.\n\n## Input\n\nThe only line of the input file contains two natural numbers _Y_ and _W_ — the results of Yakko's and Wakko's die rolls.\n\n## Output\n\nOutput the required probability in the form of irreducible fraction in format «_A/B_», where _A_ — the numerator, and _B_ — the denominator. If the required probability equals to zero, output «_0/1_». If the required probability equals to 1, output «_1/1_».\n\n[samples]\n\n## Note\n\nDot will go to Transylvania, if she is lucky to roll 4, 5 or 6 points.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Yakko、Wakko 和 Dot 是世界知名的动画人物，他们决定从卡通表演中休息一下，出门旅行一番。Yakko 梦想前往宾夕法尼亚——他的祖国以及祖先的故乡。Wakko 想去塔斯马尼亚，享受那里的海滩、阳光和大海。Dot 则选择了特兰西瓦尼亚，因为那里最神秘且不可预测。\n\n但令他们深感遗憾的是，假期非常短暂，因此只能前往上述三个地点中的一个。于是，作为最聪明的成员，Yakko 想出了一个真正天才的主意：三人各自掷一个普通的六面骰子，点数最高者获胜，并带另外两人前往自己梦想的目的地。\n\nYakko 掷出了 _Y_ 点，Wakko 掷出了 _W_ 点。现在轮到 Dot 了，但她并不着急。Dot 想确切知道她前往特兰西瓦尼亚的概率是多少。\n\n已知 Yakko 和 Wakko 是真正的绅士，因此如果他们与 Dot 的点数相同，他们会让 Dot 获胜。\n\n输入文件仅有一行，包含两个自然数 _Y_ 和 _W_，分别表示 Yakko 和 Wakko 掷骰子的结果。\n\n请以最简分数形式 «_A/B_» 输出所需概率，其中 _A_ 为分子，_B_ 为分母。如果所需概率为 0，请输出 «_0/1_»；如果为 1，请输出 «_1/1_»。 \n\nDot 将前往特兰西瓦尼亚，当且仅当她掷出 4、5 或 6 点时。\n\n## Input\n\n输入文件仅有一行，包含两个自然数 _Y_ 和 _W_，分别表示 Yakko 和 Wakko 掷骰子的结果。\n\n## Output\n\n请以最简分数形式 «_A/B_» 输出所需概率，其中 _A_ 为分子，_B_ 为分母。如果所需概率为 0，请输出 «_0/1_»；如果为 1，请输出 «_1/1_»。 \n\n[samples]\n\n## Note\n\nDot 将前往特兰西瓦尼亚，当且仅当她掷出 4、5 或 6 点时。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Input**\nLet $Y, W \\in \\mathbb{Z}$ such that $1 \\le Y, W \\le 6$.\n\n**Definitions**\nLet $\\Omega = \\{1, 2, 3, 4, 5, 6\\}$ be the sample space of a standard six-sided die.\nLet $D$ be a random variable uniformly distributed over $\\Omega$.\nLet $M = \\max(Y, W)$.\n\n**Event Specification**\nLet $E$ be the event that Dot wins. Based on the tie-breaking rules:\n$$ E = \\{D \\in \\Omega \\mid D \\ge M\\} $$\n\n**Objective**\nCalculate the probability $P(E)$:\n$$ P(E) = \\frac{|E|}{|\\Omega|} = \\frac{6 - M + 1}{6} $$\n\n**Output Format**\nOutput $P(E)$ as an irreducible fraction $\\frac{A}{B}$, where $\\gcd(A, B) = 1$.\nSpecial cases:\n*   If $P(E) = 0$, output $0/1$.\n*   If $P(E) = 1$, output $1/1$.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF9A","tags":["math","probabilities"],"sample_group":[["4 2","1/2"]],"created_at":"2026-03-03 11:00:39"}}