Square Game
Limits: 2 sec., 512 MiB
This statement was translated automatically from Ukrainian.
A square is a universal figure: both a rectangle, a rhombus, and a parallelogram, and some even call it a trapezoid.
Marichka and Zenyk decided to play a game on a square board of size \(n \times n\). Marichka starts the game, because Zenyk is a true gentleman.
Players take turns making moves according to the following rules:
on a turn, it is allowed to color a square of size \(k \times k\),
the number \(k\) is an integer from 1 to \(n - 1\) inclusive,
the new square must not overlap any previously colored cell,
its sides must be parallel to the sides of the playing board, and its vertices must lie on the grid lines if the large board is divided into \(n\) rows and \(n\) columns.
The image below in the top row shows invalid moves (red squares), and in the bottom row — valid moves (green squares). Solidly colored green cells indicate areas that were colored during previous moves.
The one who cannot make the next move loses. Determine who wins this game if both players play optimally.
Input
The single line contains a single integer \(n\) — the size of the initial square.
Output
In a single line, print Marichka or Zenyk
respectively, depending on who wins.
Constraints
\(2 \le n \le 10^6\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 5 | Marichka |
| Input (stdin) | Output (stdout) |
|---|---|
| 2 | Zenyk |
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 |
|---|