Codeforces Beta Round 70 (Div. 2)
C
Beaver Game
Codeforces
2000
原题
← BD →
翻译中…

Two beavers, Timur and Marsel, play the following game.

翻译中…

There are $*n*$ logs, each of exactly $*m*$ meters in length. The beavers move in turns. For each move a beaver chooses a log and gnaws it into some number (more than one) of equal parts, the length of each one is expressed by an integer and is no less than $*k*$ meters. Each resulting part is also a log which can be gnawed in future by any beaver. The beaver that can't make a move loses. Thus, the other beaver wins.

翻译中…

Timur makes the first move. The players play in the optimal way. Determine the winner.

翻译中…

Input

翻译中…

The first line contains three integers $*n*$, $*m*$, $*k*$ ($1 ≤ *n*, *m*, *k* ≤ 10^{9}$).

翻译中…

Output

翻译中…

Print "Timur", if Timur wins, or "Marsel", if Marsel wins. You should print everything without the quotes.

翻译中…

Note

翻译中…

In the first sample the beavers only have one log, of $15$ meters in length. Timur moves first. The only move he can do is to split the log into $3$ parts each $5$ meters in length. Then Marsel moves but he can't split any of the resulting logs, as $*k* = 4$. Thus, the winner is Timur.

翻译中…

In the second example the beavers have $4$ logs $9$ meters in length. Timur can't split any of them, so that the resulting parts possessed the length of not less than $5$ meters, that's why he loses instantly.

翻译中…

样例

Input #1
1 15 4
Output #1
Timur
InputCopy OutputCopy
Input #2
4 9 5
Output #2
Marsel
InputCopy OutputCopy
题目信息
题号
78C
时间限制
1 s
内存限制
256 MB
标签
动态规划
博弈论
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。