408975: GYM103401 D Hard Nim

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Hard Nimtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

lyw and his friend zyw are playing an exciting game called "Hard Nim". In this game, there is a pile of $$$N$$$ stones on the desk. Two players take turns selecting some stones and remove them from the desk. lyw will always go first. The game ends when there is no stone left on the desk. The player who removes the last stone wins the game.

There are also two additional constraints in the game. First, in each turn, the player must remove at least 1 and at most $$$M$$$ stones from the desk. Second, the player will lose the game if the number of stones remaining(represents in binary) has odd number of ones after his removing.

Assume both of them playing optimally, can you judge who will win the "Hard Nim" game?

Input

Single line contains two intergers $$$N,M (1 \leq N \leq 10^{12}, 1 \leq M \leq 10^6)$$$. It guarantees that $$$N$$$ will have an even number of ones in its binary representation.

Output

Output "lyw" if lyw will win, otherwise ouput "zyw"

ExamplesInput
3 1
Output
zyw
Input
3 2
Output
zyw
Input
3 3
Output
lyw

加入题单

算法标签: