{"problem":{"name":"B. Paper Game","description":{"content":"Hasan and Hussain are playing a game with W × H paper, the game consist of turns; Hasan starts first. On each turn, the player chooses one of the pieces of paper and cuts it into two papers such that ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":65536},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10102B"},"statements":[{"statement_type":"Markdown","content":"Hasan and Hussain are playing a game with W × H paper, the game consist of turns; Hasan starts first. On each turn, the player chooses one of the pieces of paper and cuts it into two papers such that the cut must be a straight line parallel to one of the paper sides and must cut the paper to two pieces of paper with integer dimensions.\n\n \n\nThe loser is the one who can't make a move (i.e when all pieces of paper become 1 × 1).  Assuming that Hasan and Hussain are playing optimally, who will win the game?\n\nThe first line of input is an integer T(1 ≤ T ≤ 101) which represents the number of test cases. Each of the next T lines consists of two space-separated integers W,H (1 ≤ W,H ≤ 100,000) the width and the height of the paper.\n\nFor each test case, output a single line representing its answer; if Hasan is the winner output \"Hasan\" (without quotes) otherwise \"Hussain\" (without quotes).\n\n## Input\n\nThe first line of input is an integer T(1 ≤ T ≤ 101) which represents the number of test cases. Each of the next T lines consists of two space-separated integers W,H (1 ≤ W,H ≤ 100,000) the width and the height of the paper.\n\n## Output\n\nFor each test case, output a single line representing its answer; if Hasan is the winner output \"Hasan\" (without quotes) otherwise \"Hussain\" (without quotes).\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ t \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, t\\} $, let $ s_k^{(1)}, s_k^{(2)} $ be two strings over the English alphabet (uppercase and lowercase).\n\n**Constraints**  \n1. $ 1 \\le t \\le 1000 $  \n2. For each $ k $, $ 1 \\le |s_k^{(1)}|, |s_k^{(2)}| \\le 100 $  \n3. Each character in $ s_k^{(1)}, s_k^{(2)} $ is an English letter (a–z, A–Z)\n\n**Objective**  \nFor each test case $ k $, determine whether $ s_k^{(1)} $ and $ s_k^{(2)} $ are *Arabic-similar*, defined as:  \n- Ignore case: treat uppercase and lowercase letters as identical.  \n- Replace all occurrences of `'b'` and `'p'` (in any case) with a common canonical form (e.g., map both to `'b'` or `'p'`).  \n- Replace all occurrences of `'i'` and `'e'` (in any case) with a common canonical form.  \n\nFormally, define a canonicalization function $ f: \\Sigma^* \\to \\Sigma^* $ where:  \n- $ f(c) = \\text{lower}(c) $ for all $ c \\in \\Sigma $,  \n- Then:  \n  - If $ f(c) = 'p' $, set $ f(c) = 'b' $,  \n  - If $ f(c) = 'e' $, set $ f(c) = 'i' $.  \n\nThen, $ s_k^{(1)} $ and $ s_k^{(2)} $ are Arabic-similar if and only if:  \n$$ f(s_k^{(1)}) = f(s_k^{(2)}) $$  \n\nOutput \"Yes\" if equal, \"No\" otherwise.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10102B","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}