{"problem":{"name":"A. Mahmoud and Ehab and the even-odd game","description":{"content":"Mahmoud and Ehab play a game called the even-odd game. Ehab chooses his favorite integer _n_ and then they take turns, starting from Mahmoud. In each player's turn, he has to choose an integer _a_ and","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF959A"},"statements":[{"statement_type":"Markdown","content":"Mahmoud and Ehab play a game called the even-odd game. Ehab chooses his favorite integer _n_ and then they take turns, starting from Mahmoud. In each player's turn, he has to choose an integer _a_ and subtract it from _n_ such that:\n\n*   1 ≤ _a_ ≤ _n_.\n*   If it's Mahmoud's turn, _a_ has to be even, but if it's Ehab's turn, _a_ has to be odd.\n\nIf the current player can't choose any number satisfying the conditions, he loses. Can you determine the winner if they both play optimally?\n\n## Input\n\nThe only line contains an integer _n_ (1 ≤ _n_ ≤ 109), the number at the beginning of the game.\n\n## Output\n\nOutput \"_Mahmoud_\" (without quotes) if Mahmoud wins and \"_Ehab_\" (without quotes) otherwise.\n\n[samples]\n\n## Note\n\nIn the first sample, Mahmoud can't choose any integer _a_ initially because there is no positive even integer less than or equal to 1 so Ehab wins.\n\nIn the second sample, Mahmoud has to choose _a_ = 2 and subtract it from _n_. It's Ehab's turn and _n_ = 0. There is no positive odd integer less than or equal to 0 so Mahmoud wins.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Mahmoud 和 Ehab 玩一个叫做偶奇游戏的游戏。Ehab 选择他最喜欢的整数 $n$，然后他们轮流进行，从 Mahmoud 开始。在每个玩家的回合中，他必须选择一个整数 $a$ 并从 $n$ 中减去它，使得：\n\n如果当前玩家无法选择任何满足条件的数字，他就输了。如果双方都采取最优策略，你能确定获胜者吗？\n\n唯一的一行包含一个整数 $n$ $(1 ≤ n ≤ 10^9)$，即游戏开始时的数字。\n\n如果 Mahmoud 获胜，请输出 \"_Mahmoud_\"（不含引号），否则输出 \"_Ehab_\"（不含引号）。\n\n在第一个测试用例中，Mahmoud 最初无法选择任何整数 $a$，因为不存在小于或等于 $1$ 的正偶整数，因此 Ehab 获胜。\n\n在第二个测试用例中，Mahmoud 必须选择 $a = 2$ 并从 $n$ 中减去它。轮到 Ehab 时，$n = 0$。不存在小于或等于 $0$ 的正奇整数，因此 Mahmoud 获胜。\n\n## Input\n\n唯一的一行包含一个整数 $n$ $(1 ≤ n ≤ 10^9)$，即游戏开始时的数字。\n\n## Output\n\n如果 Mahmoud 获胜，请输出 \"_Mahmoud_\"（不含引号），否则输出 \"_Ehab_\"（不含引号）。\n\n[samples]\n\n## Note\n\n在第一个测试用例中，Mahmoud 最初无法选择任何整数 $a$，因为不存在小于或等于 $1$ 的正偶整数，因此 Ehab 获胜。在第二个测试用例中，Mahmoud 必须选择 $a = 2$ 并从 $n$ 中减去它。轮到 Ehab 时，$n = 0$。不存在小于或等于 $0$ 的正奇整数，因此 Mahmoud 获胜。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the initial integer, with $ 1 \\leq n \\leq 10^9 $.  \nPlayers alternate turns, starting with Mahmoud.  \nOn a player’s turn, they must choose a positive integer $ a $ such that:  \n- If it is Mahmoud’s turn, $ a $ must be even and $ a \\leq n $.  \n- If it is Ehab’s turn, $ a $ must be odd and $ a \\leq n $.  \n\nThe player unable to make a valid move loses.\n\n**Constraints**  \n$ 1 \\leq n \\leq 10^9 $\n\n**Objective**  \nDetermine the winner under optimal play:  \n- Output \"Mahmoud\" if the first player (Mahmoud) has a winning strategy.  \n- Output \"Ehab\" otherwise.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF959A","tags":["games","math"],"sample_group":[["1","Ehab"],["2","Mahmoud"]],"created_at":"2026-03-03 11:00:39"}}