Zenyk, Marichka and Interesting Game
Limits: 2 sec., 256 MiB
As you may know Zenyk and Marichka are together for years. They will live forever in our hearts. And problem statements.
But they are bored of such casual life. So they decide to play an interesting game. Zenyk and Marichka have \(N\) piles of stones. \(i\)-th pile contains \(X_i\) stones. Zenyk and Marichka take turns alternately. Zenyk moves first. Zenyk takes exactly \(A\) stones from any pile in one move (of course, this pile should contain at least \(A\) stones). Marichka takes exactly \(B\) stones from any pile.
Player who cannot make a move, that means that any pile contains enough stones, loses the game.
Marichka is interested who will win if both players play optimally.
Input
First line contains 3 integers \(N,A,B\).
Second line contains \(N\) integers \(X_i\).
Output
Print “Zenyk“
, if Zenyk will win and
“Marichka“
, otherwise.
Constraints
\(1 \le N \le 10^5\),
\(1 \le X, A, B \le 10^9\).
Samples
Input (stdin) | Output (stdout) |
---|---|
4 4 7 7 2 14 7 | Marichka |
Submit a solution
Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
---|
Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
---|